Originally created by @Commiccannon on GitHub (Apr 15, 2023).
Steps to reproduce
Docker install on windows server, listen to audiobooks on web player getting following error: Progress is not being synced. Restart playback
Restarted the server and progress from last two days from android app had disappeared, all stats bar items finished have been deleted. Logs giving: [DB] Update entity user Failed: Error: Lock file is already being held
Originally created by @Commiccannon on GitHub (Apr 15, 2023).
### Steps to reproduce
Docker install on windows server, listen to audiobooks on web player getting following error: Progress is not being synced. Restart playback
Restarted the server and progress from last two days from android app had disappeared, all stats bar items finished have been deleted. Logs giving: [DB] Update entity user Failed: Error: Lock file is already being held
### Expected behaviour
No errors and progress storage
### Actual behaviour
Errors and progress not stored
### Environment data
Audiobookshelf Version:
V2.2.18
- [ X] Android App?
- [ ] iOS App?
#### Android Issue
Android version:
0.9.63
Device model:
S32
Stock or customized system:
Stock
adam
added the bug label 2026-04-24 23:27:34 +02:00
Update, found the logs in the docker environment not just the web gui 2023-04-15 17:22:47 [2023-04-15 07:22:47] ERROR: Failed to get session Error: Lock file is already being held 2023-04-15 17:22:47 at /server/libs/properLockfile/lib/lockfile.js:68:47 2023-04-15 17:22:47 at callback (/node_modules/graceful-fs/polyfills.js:306:20) 2023-04-15 17:22:47 at FSReqCallback.oncomplete (node:fs:203:5) { 2023-04-15 17:22:47 code: 'ELOCKED', 2023-04-15 17:22:47 file: '/config/sessions/data/data.1.json' 2023-04-15 17:22:47 } (Db.js:458)
@Commiccannon commented on GitHub (Apr 15, 2023):
Update, found the logs in the docker environment not just the web gui
`2023-04-15 17:22:47 [2023-04-15 07:22:47] ERROR: Failed to get session Error: Lock file is already being held
2023-04-15 17:22:47 at /server/libs/properLockfile/lib/lockfile.js:68:47
2023-04-15 17:22:47 at callback (/node_modules/graceful-fs/polyfills.js:306:20)
2023-04-15 17:22:47 at FSReqCallback.oncomplete (node:fs:203:5) {
2023-04-15 17:22:47 code: 'ELOCKED',
2023-04-15 17:22:47 file: '/config/sessions/data/data.1.json'
2023-04-15 17:22:47 } (Db.js:458)`
This is a known issue that has to do with the database specifically on some Windows file systems.
I'm not able to reproduce this on my Windows machine so haven't been able to figure out why some users have this problem.
@advplyr commented on GitHub (Apr 15, 2023):
This is a known issue that has to do with the database specifically on some Windows file systems.
I'm not able to reproduce this on my Windows machine so haven't been able to figure out why some users have this problem.
I just had this problem after restarting my audiobookshelf container after restarting my windows pc (ABS running in docker desktop). I cleared the cache in ABS and then restarted my container in docker desktop and it fixed the issue.
@DebrodeD commented on GitHub (May 24, 2023):
I just had this problem after restarting my audiobookshelf container after restarting my windows pc (ABS running in docker desktop). I cleared the cache in ABS and then restarted my container in docker desktop and it fixed the issue.
Nevermind, the problem comes back shortly after restarting (though restarting does fix it temporarily).
@advplyr any ideas?
@DebrodeD commented on GitHub (May 25, 2023):
Nevermind, the problem comes back shortly after restarting (though restarting does fix it temporarily).

@advplyr any ideas?
This lock file issue only seems to happen with Windows and using a remote file system. Can you describe your server set up and file system?
@advplyr commented on GitHub (May 25, 2023):
This lock file issue only seems to happen with Windows and using a remote file system. Can you describe your server set up and file system?
A bit more info: When I restart, it seems to start working again, but there are hundreds of entries under listening sessions where there should only be a few. They all seem to be duplicated.
@DebrodeD commented on GitHub (May 25, 2023):
A bit more info: When I restart, it seems to start working again, but there are hundreds of entries under listening sessions where there should only be a few. They all seem to be duplicated.

My books are stored on Pooled Drive (using Stablebit DrivePool). Config & Metadata folders are my C (Primary boot) Drive.
@DebrodeD commented on GitHub (May 25, 2023):
My books are stored on Pooled Drive (using Stablebit DrivePool). Config & Metadata folders are my C (Primary boot) Drive.
As you can see from my android app, the saves are showing up with an error message:
However, the "time remaining" status on the web app is updating with each one, so it seems like it's still making it through? What definitely isn't working at all with these errors however is the "listening sessions".
@DebrodeD commented on GitHub (May 26, 2023):
As you can see from my android app, the saves are showing up with an error message:

However, the "time remaining" status on the web app is updating with each one, so it seems like it's still making it through? What definitely isn't working at all with these errors however is the "listening sessions".
If you are seeing lock file errors on the server then data isn't being saved. I haven't been able to reproduce that lockfile issue on Windows yet so I'm not sure how to resolve it.
@advplyr commented on GitHub (May 26, 2023):
If you are seeing lock file errors on the server then data isn't being saved. I haven't been able to reproduce that lockfile issue on Windows yet so I'm not sure how to resolve it.
@wtangofoxtrot commented on GitHub (May 29, 2023):
experiencing this issue on linux with a nfs mounted share that contains the db, unable to add/track progress to the docker service now.
@wtangofoxtrot commented on GitHub (May 29, 2023):
experiencing this issue on linux with a nfs mounted share that contains the db, unable to add/track progress to the docker service now.
Happening here too on linux. Audiobookshelf docker files are on the main ext4 disk. Stopping the container & deleting all the lock files & folders, sometimes fixes it temporarily. Error I get:
`[2023-06-17 01:53:42] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:45] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:48] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:50] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:52] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:55] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:58] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:00] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:02] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:05] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
`
@riffy13 commented on GitHub (Jun 17, 2023):
Happening here too on linux. Audiobookshelf docker files are on the main ext4 disk. Stopping the container & deleting all the lock files & folders, sometimes fixes it temporarily. Error I get:
`[2023-06-17 01:53:42] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:45] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:48] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:50] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:52] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:55] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:58] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:00] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:02] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:05] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
`
I am also experiencing this error. Debian 12 with Android and browser.
@advplyr Why was the bug closed?
@DocBrown101 commented on GitHub (Apr 4, 2024):
I am also experiencing this error. Debian 12 with Android and browser.
@advplyr Why was the bug closed?
This is closed because the database that was causing this issue was removed entirely so you won't be getting that error log unless you are on v2.2.24 or earlier.
@advplyr commented on GitHub (Apr 5, 2024):
This is closed because the database that was causing this issue was removed entirely so you won't be getting that error log unless you are on v2.2.24 or earlier.
I am running the latest version 2.8.1, but I have to add that this problem only occurred at the beginning, now that my progress is well over 30%, the sync seems to work.
@DocBrown101 commented on GitHub (Apr 6, 2024):
I am running the latest version 2.8.1, but I have to add that this problem only occurred at the beginning, now that my progress is well over 30%, the sync seems to work.
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.
Originally created by @Commiccannon on GitHub (Apr 15, 2023).
Steps to reproduce
Docker install on windows server, listen to audiobooks on web player getting following error: Progress is not being synced. Restart playback
Restarted the server and progress from last two days from android app had disappeared, all stats bar items finished have been deleted. Logs giving: [DB] Update entity user Failed: Error: Lock file is already being held
Expected behaviour
No errors and progress storage
Actual behaviour
Errors and progress not stored
Environment data
Audiobookshelf Version:
V2.2.18
Android Issue
Android version:
0.9.63
Device model:
S32
Stock or customized system:
Stock
@Commiccannon commented on GitHub (Apr 15, 2023):
Update, found the logs in the docker environment not just the web gui
2023-04-15 17:22:47 [2023-04-15 07:22:47] ERROR: Failed to get session Error: Lock file is already being held 2023-04-15 17:22:47 at /server/libs/properLockfile/lib/lockfile.js:68:47 2023-04-15 17:22:47 at callback (/node_modules/graceful-fs/polyfills.js:306:20) 2023-04-15 17:22:47 at FSReqCallback.oncomplete (node:fs:203:5) { 2023-04-15 17:22:47 code: 'ELOCKED', 2023-04-15 17:22:47 file: '/config/sessions/data/data.1.json' 2023-04-15 17:22:47 } (Db.js:458)@advplyr commented on GitHub (Apr 15, 2023):
This is a known issue that has to do with the database specifically on some Windows file systems.
I'm not able to reproduce this on my Windows machine so haven't been able to figure out why some users have this problem.
@advplyr commented on GitHub (Apr 15, 2023):
Duplicate of https://github.com/advplyr/audiobookshelf/issues/1326
@DebrodeD commented on GitHub (May 24, 2023):
I just had this problem after restarting my audiobookshelf container after restarting my windows pc (ABS running in docker desktop). I cleared the cache in ABS and then restarted my container in docker desktop and it fixed the issue.
@DebrodeD commented on GitHub (May 25, 2023):
Nevermind, the problem comes back shortly after restarting (though restarting does fix it temporarily).

@advplyr any ideas?
@advplyr commented on GitHub (May 25, 2023):
This lock file issue only seems to happen with Windows and using a remote file system. Can you describe your server set up and file system?
@DebrodeD commented on GitHub (May 25, 2023):
A bit more info: When I restart, it seems to start working again, but there are hundreds of entries under listening sessions where there should only be a few. They all seem to be duplicated.

@DebrodeD commented on GitHub (May 25, 2023):
My books are stored on Pooled Drive (using Stablebit DrivePool). Config & Metadata folders are my C (Primary boot) Drive.
@DebrodeD commented on GitHub (May 26, 2023):
As you can see from my android app, the saves are showing up with an error message:
However, the "time remaining" status on the web app is updating with each one, so it seems like it's still making it through? What definitely isn't working at all with these errors however is the "listening sessions".
@advplyr commented on GitHub (May 26, 2023):
If you are seeing lock file errors on the server then data isn't being saved. I haven't been able to reproduce that lockfile issue on Windows yet so I'm not sure how to resolve it.
@wtangofoxtrot commented on GitHub (May 29, 2023):
experiencing this issue on linux with a nfs mounted share that contains the db, unable to add/track progress to the docker service now.
@riffy13 commented on GitHub (Jun 17, 2023):
Happening here too on linux. Audiobookshelf docker files are on the main ext4 disk. Stopping the container & deleting all the lock files & folders, sometimes fixes it temporarily. Error I get:
`[2023-06-17 01:53:42] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:45] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:48] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:50] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:52] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:55] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:53:58] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:00] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:02] ERROR: [DB] Update entity user Failed: Error: Lock file is already being held (Db.js:415)
[2023-06-17 01:54:05] ERROR: [DB] Update entity session Failed: Error: Lock file is already being held (Db.js:415)
`
@DocBrown101 commented on GitHub (Apr 4, 2024):
I am also experiencing this error. Debian 12 with Android and browser.
@advplyr Why was the bug closed?
@nichwall commented on GitHub (Apr 4, 2024):
Is your database stored on a network drive?
(Originally closed as a duplicate of another issue)
@riffy13 commented on GitHub (Apr 4, 2024):
Not on network drive, & still happening only in browsers.
@DocBrown101 commented on GitHub (Apr 4, 2024):
No, just a normal internal NVME SSD
@advplyr commented on GitHub (Apr 5, 2024):
This is closed because the database that was causing this issue was removed entirely so you won't be getting that error log unless you are on v2.2.24 or earlier.
@DocBrown101 commented on GitHub (Apr 6, 2024):
I am running the latest version 2.8.1, but I have to add that this problem only occurred at the beginning, now that my progress is well over 30%, the sync seems to work.