mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: Lock file is already being held #844
Closed
opened 2026-04-24 23:23:50 +02:00 by adam
·
31 comments
No Branch/Tag Specified
master
book_tags_genres_dedupe
episode_download_fallback
Issue-4540-SortBy-StartedDate-and-FinishedDate
episode_meta_tagging
fix_authorize_race_condition
redirect_transcode_requests
progress_updated_sort
fix_ereader_socket_event
fix_change_empty_root_password
fix_podcast_session_track_index
fix_set_token
session_modal_user
localize_durations
fix_oidc_create_user
jwt_auth_refactor
fix_scanner_deleting_single_file_books
fix_mediaprogress_updatedat_2
experimental_next_client
podcast_episode_duration
episode-timestamps-clickable
book_author_secondary_sort_title
podcast_useragents
pathexists_user_access
fix_pathexists_join
book_author_secondary_sort
clean_duplicate_mediaprogress
sanitize_html_description
trix_prevent_attachments
check_path_api_fix
fix_mediaprogress_updatedat
increase_express_json_limit
fix_dockerfile_nunicode
search_episodes
audiobook_tools_update
episode_secondary_sorts
hls_stream_url_update
new_session_track_endpoint
audiobook_tools_enhancements
watcher_rescans_update
player_track_tooltip
fix_exclude_prefixes_crash
socket_item_events
fix_podcast_episode_scanner_promise
new_stats_controller
count_cache_for_userpermissions
parsing-opf-v3
validate_migration_files
fix-quick-match-all-crash
fix-chapter-end-sleep-timer
stringify_sequelize_query
remove-col-ambiguity
fix_next_prev_edit_description
details_trim_whitespace
fix_content_url_basepath
fix_logger_fatal
progress_bar_visibility
batch-edit-populate-map-details
feed_generator_updates
bookmark-modal-updates
migrate-library-item-in-scanner
migrate-new-library-items
migrate-podcasts-new-library-item-2
migrate-podcasts-new-library-item
fix-remove-episode-from-playlist
playback-session-use-new-library-item
refactor-library-item
fix-heatmap-caption
feed-episodes-upsert
share-media-player-media-session-api
remove-old-playlist
remove_old_collection_object
plugin-implementation-demo
feed_migration
refactor-feeds-from-item
fix_remove_authors_no_books
v2.17.3-fk-constraints-migration
migrations-first-upgrade
sqlite_2
feature/nuxt-target-server
waveform
sqlite
playlists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
v1.3.3
v1.3.1
v1.2.8
v1.2.6
v1.2.5
v1.2.4
v1.2.1
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.0.0
0.9.61-beta.0
0.9.61-beta
Labels
Clear labels
authentication
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
pull-request
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
adam (Adam Melkus)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/audiobookshelf#844
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @barelylit on GitHub (Dec 28, 2022).
Describe the issue
Lots and lots of lock file already being held, happens quite freqeuently, restarting the container is the only thing that seems to sort it, temporarily
Steps to reproduce the issue
Audiobookshelf version
v2.2.11
How are you running audiobookshelf?
Docker
@advplyr commented on GitHub (Dec 30, 2022):
Are you using a USB connected hard drive on Windows file system? As mentioned here #1095
@barelylit commented on GitHub (Dec 30, 2022):
For library, yes. For config, no:
version: "3.7"
services:
audiobookshelf:
image: ghcr.io/advplyr/audiobookshelf:latest
environment:
- AUDIOBOOKSHELF_UID=99
- AUDIOBOOKSHELF_GID=100
ports:
- 4517:80
volumes:
- z:\Books:/audiobooks
- Z:\Family\JoeyBooks:/joey
- c:\docker\audiobookshelf\config:/config
- c:\docker\audiobookshelf\metadata:/metadata
c:\ is a 500gb Crucial SSD
@advplyr commented on GitHub (Dec 30, 2022):
Are you running Docker from Windows
@barelylit commented on GitHub (Dec 30, 2022):
Yeah, Docker Desktop v4.15.0
@advplyr commented on GitHub (Dec 30, 2022):
This issue is specific to windows file systems and I'm not sure what it is. It only impacts a very small percent of users so it is something uncommon with the way the file system is setup I'm guessing.
@barelylit commented on GitHub (Dec 30, 2022):
File system on that drive is NTFS, so ive opened up the permissions to "everyone" to have full control of c:\docker, see if that helps
(only me on the system so not concerned about security on that folder)
@Poundsy82 commented on GitHub (Dec 31, 2022):
I'm seeing the same issue.
Windows server 2022 with NTFS file system. Docker and container installed on an NVME drive while the library is stored on a traditional spinning drive.
There is nothing unusual about my setup, it's just a standalone sata connected drive, no raid arrays or anything else unusable like that.
@barelylit commented on GitHub (Jan 3, 2023):
FWIW, this seems to have resolved the issue, have not seen it re-occuring since opening up the permissions.
Interestingly, I was getting 2 to 3 failures to open a book on first hitting play, it would give error that server playback unavailabile - I had put this down to a moment for a USB drive to spin up perhaps, but this also seems to have been resolved, havent see this since the permissions were opened up
@Poundsy82 commented on GitHub (Jan 4, 2023):
@barelylit
I tried giving full access perms to users on my config and metadata folders but it didn't fix it.
I'll try everyone instead of users on those folders and see if that works.
Like you my system is only me so it's not a big deal.
@Poundsy82 commented on GitHub (Jan 5, 2023):
Gave permissions to everyone in both my config and metadata as well as my library folders and also my docker folder as well.
Same problem persisting.
@barelylit commented on GitHub (Jan 5, 2023):
@Poundsy82 When i changed the permissions on mine, i removed inheritance and replaced permissions on all child objects to ensure there wasnt something burried with the tighter permissions, perhaps worth a try on that?
I only did it on the c:\docker\audiobookshelf folder, which is effectively just the metadata and config
@Poundsy82 commented on GitHub (Jan 5, 2023):
Thanks, will try that. I didn't do that but now have.
@barelylit commented on GitHub (Jan 6, 2023):
Scratch that, seems its back again this morning, was just in a lull
@Poundsy82 commented on GitHub (Jan 6, 2023):
Yeah hasn't fixed it for me either.
@Poundsy82 commented on GitHub (Jan 9, 2023):
I've also tried moving the config folder to the OS drive just to be sure it wasn't some other weird thing going on. No change
@wtangofoxtrot commented on GitHub (Feb 19, 2023):
Same issue here, when i restart i get the below errors at startup followed by the DB errors when trying to play something.
I am running in docker on a ubuntu 22.04
All disks are mounted via a nfs share (no usb involved)
@JamesOEastern commented on GitHub (Mar 5, 2023):
So I had a similar issue, with playback not syncing. The solution seems to be "not" running Docker with Admin privileges.
@plague-doctor commented on GitHub (Mar 6, 2023):
This issue has been reported here: https://github.com/advplyr/audiobookshelf/issues/845 and here https://github.com/advplyr/audiobookshelf/issues/653
I workaround this by moving mapping
/configout of nfs to local drive.I think those problems will disappear as soon as the database will be moved to sqlite or any other dedicated database.
@advplyr is this still on your radar? Any progress on that?
@advplyr commented on GitHub (Mar 6, 2023):
Definitely still on my radar. No progress on this yet but there are some discussions going on.
@cadric commented on GitHub (Mar 28, 2023):
I just want to report that I have this error on a Dietpi (debian) server in docker. Just started yesterday :/
Nothing seems to resolve this error and I can no longer add new media.
Log
@advplyr commented on GitHub (Mar 28, 2023):
You have to go into the
/configfolder and delete.lockfiles. Then restart the server.@Commiccannon commented on GitHub (Apr 16, 2023):
Tried that, still getting errors. If it helps my config directory is stores on my c drive being an ssd with windows, my audiobooks are stored on a RAID5 array in the same pc mounted as D drive
@advplyr commented on GitHub (Apr 16, 2023):
Where is the server running from?
@Commiccannon commented on GitHub (Apr 16, 2023):
Server was running on Windows pc through docker installed via community guidelines. I reinstalled this morning same method however putting the config and metadata folders separately and on the same drive as my audiobooks, will let you know if the issue persists
@EloquenceWinters commented on GitHub (Apr 30, 2023):
Additional data points for you, in case that helps.
I have this issue (resulting in the error popup about progress not being synced), and I'm running:
Following the suggestion above, I set permissions for the Docker, data, and config folders to Everyone (clearing inheritance and then applying to all files in the folders), but that doesn't seem to fix the problem for me.
Stopping, closing, and restarting Docker fixes it for a time.
@Commiccannon commented on GitHub (Apr 30, 2023):
Only thing that worked permanently has been reinstalling audiobookshelf unfortunately, I recommend making a backup then reinstalling with the backup it only takes half hour or so and has been running fine for me for at least 2 weeks
@kymahi commented on GitHub (Jun 14, 2023):
To add some more context to this, I'm running Docker on an M1 Mac Mini, USB ExFat drive and getting this error for one client.
@barelylit commented on GitHub (Jun 15, 2023):
FWIW, i followed Commiccannon advice and did the following:
Took less than 5 minutes, and seems to be working fine ever since
@barelylit commented on GitHub (Jun 26, 2023):
Spoke to soon, still fubar.
@barelylit commented on GitHub (Jun 29, 2023):
So, its a bit of a bodge, but I seem to have sorted this with a workaround
I made a virtual hard drive file, of 1gb. Attached and made a partition with it formatted as Fat32. Moved the config and metadata to the virtual drive to avoid any NTFS permission issues.
Seems to be working fine so far
https://learn.microsoft.com/en-us/windows-server/storage/disk-management/manage-virtual-hard-disks
@advplyr commented on GitHub (Jul 21, 2023):
The latest release 2.3.3 is using Sqlite now. The library that was being used where this error was coming from is no longer being used.