Progress is not being synced. Restart playback #528

Closed
opened 2026-04-24 23:27:34 +02:00 by adam · 18 comments
Owner

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

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
adam closed this issue 2026-04-24 23:27:34 +02:00
Author
Owner

@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)

@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)`
Author
Owner

@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): 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.
Author
Owner

@advplyr commented on GitHub (Apr 15, 2023):

Duplicate of https://github.com/advplyr/audiobookshelf/issues/1326

@advplyr commented on GitHub (Apr 15, 2023): Duplicate of https://github.com/advplyr/audiobookshelf/issues/1326
Author
Owner

@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 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.
Author
Owner

@DebrodeD commented on GitHub (May 25, 2023):

Nevermind, the problem comes back shortly after restarting (though restarting does fix it temporarily).
2023-05-25 12_31_58-Audiobookshelf

@advplyr any ideas?

@DebrodeD commented on GitHub (May 25, 2023): Nevermind, the problem comes back shortly after restarting (though restarting does fix it temporarily). ![2023-05-25 12_31_58-Audiobookshelf](https://github.com/advplyr/audiobookshelf-app/assets/16518976/fb9e58c7-f17e-433c-8b64-195b5d4dfc52) @advplyr any ideas?
Author
Owner

@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?

@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?
Author
Owner

@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.
2023-05-25 14_29_35-Audiobookshelf

@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. ![2023-05-25 14_29_35-Audiobookshelf](https://github.com/advplyr/audiobookshelf-app/assets/16518976/f1e82fdc-497a-4e00-a6a4-8d3314b2c090)
Author
Owner

@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 25, 2023): My books are stored on Pooled Drive (using Stablebit DrivePool). Config & Metadata folders are my C (Primary boot) Drive.
Author
Owner

@DebrodeD commented on GitHub (May 26, 2023):

As you can see from my android app, the saves are showing up with an error message:

photo_2023-05-25_16-10-27

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: ![photo_2023-05-25_16-10-27](https://github.com/advplyr/audiobookshelf-app/assets/16518976/b8489abb-ee35-4b78-b32c-a0200414c94d) 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".
Author
Owner

@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.

@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.
Author
Owner

@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.
Author
Owner

@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)
`

@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) `
Author
Owner

@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?

@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?
Author
Owner

@nichwall commented on GitHub (Apr 4, 2024):

Is your database stored on a network drive?

(Originally closed as a duplicate of another issue)

@nichwall commented on GitHub (Apr 4, 2024): Is your database stored on a network drive? (Originally closed as a duplicate of another issue)
Author
Owner

@riffy13 commented on GitHub (Apr 4, 2024):

Not on network drive, & still happening only in browsers.

@riffy13 commented on GitHub (Apr 4, 2024): Not on network drive, & still happening only in browsers.
Author
Owner

@DocBrown101 commented on GitHub (Apr 4, 2024):

No, just a normal internal NVME SSD

@DocBrown101 commented on GitHub (Apr 4, 2024): No, just a normal internal NVME SSD
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#528