[Bug]: Progress not being synced (timeout too aggressive) #1227

Closed
opened 2026-04-24 23:36:25 +02:00 by adam · 4 comments
Owner

Originally created by @deanishe on GitHub (Jun 30, 2023).

Describe the issue

I constantly get the "Progress is not being synced. Restart playback" error (devtools reports NS_BINDING_ABORTED).

As best as I can tell, this is because the .../session/.../sync requests are timing out.

They fail in my browser, but when I copy the requests and run them with curl, they work perfectly well.

I assume the cause is this aggressive 3s timeout.

That's too demanding for my weedy server and iffy Internet connection.

Can you adjust this to something more forgiving of (or make it back off under) less than optimal conditions?

Steps to reproduce the issue

  1. Play media under conditions (network, server load) in which ABS cannot respond within the 3 seconds the player expects.

Audiobookshelf version

v2.2.23

How are you running audiobookshelf?

Debian/PPA

Originally created by @deanishe on GitHub (Jun 30, 2023). ### Describe the issue I constantly get the "Progress is not being synced. Restart playback" error (devtools reports `NS_BINDING_ABORTED`). As best as I can tell, this is because the `.../session/.../sync` requests are timing out. They fail in my browser, but when I copy the requests and run them with `curl`, they work perfectly well. I assume the cause is [this aggressive 3s timeout](https://github.com/advplyr/audiobookshelf/blob/bdbc5e3161dd8d9cb8aeb9ec929b29b05c613caf/client/players/PlayerHandler.js#L338). That's too demanding for my weedy server and iffy Internet connection. Can you adjust this to something more forgiving of (or make it back off under) less than optimal conditions? ### Steps to reproduce the issue 1. Play media under conditions (network, server load) in which ABS cannot respond within the 3 seconds the player expects. ### Audiobookshelf version v2.2.23 ### How are you running audiobookshelf? Debian/PPA
adam added the bug label 2026-04-24 23:36:25 +02:00
adam closed this issue 2026-04-24 23:36:26 +02:00
Author
Owner

@advplyr commented on GitHub (Jul 1, 2023):

Increased to 6 seconds for the next release and it has to fail 3 times before the error is shown

@advplyr commented on GitHub (Jul 1, 2023): Increased to 6 seconds for the next release and it has to fail 3 times before the error is shown
Author
Owner

@deanishe commented on GitHub (Jul 7, 2023):

Is there a reason for such low timeouts?

Obviously, you want progress status to be as up-to-date as possible, but being 30 or 60 seconds out of date seems far preferable to failing to sync progress completely. I'd rather get dumped back to the beginning of a chapter than the beginning of the book.

@deanishe commented on GitHub (Jul 7, 2023): Is there a reason for such low timeouts? Obviously, you want progress status to be as up-to-date as possible, but being 30 or 60 seconds out of date seems far preferable to failing to sync progress completely. I'd rather get dumped back to the beginning of a chapter than the beginning of the book.
Author
Owner

@advplyr commented on GitHub (Jul 8, 2023):

Currently the web client is syncing progress every 10 seconds (except for the first sync that starts at 20 seconds). The only reason is we want to timeout before the next sync attempt.

6 seconds is arbitrary but to me this is a very long time for a server to respond to a small request. If your server is taking that long to respond to requests I'm surprised the software is still tolerable to use.

All that being said, you are right that the timeout can be extended more for times where network connection is poor. I updated the timeout to 9s (giving 1s buffer before the next sync). I also updated the number of failures to 4 before the error toast is shown. After looking at the code again I realized I was mistakenly showing the alert after 2 failed syncs before when I was saying it was 3.

tldr; a failure to sync progress alert won't be shown until ~40 seconds of not syncing.

@advplyr commented on GitHub (Jul 8, 2023): Currently the web client is syncing progress every 10 seconds (except for the first sync that starts at 20 seconds). The only reason is we want to timeout before the next sync attempt. 6 seconds is arbitrary but to me this is a very long time for a server to respond to a small request. If your server is taking that long to respond to requests I'm surprised the software is still tolerable to use. All that being said, you are right that the timeout can be extended more for times where network connection is poor. I updated the timeout to 9s (giving 1s buffer before the next sync). I also updated the number of failures to 4 before the error toast is shown. After looking at the code again I realized I was mistakenly showing the alert after 2 failed syncs before when I was saying it was 3. tldr; a failure to sync progress alert won't be shown until ~40 seconds of not syncing.
Author
Owner

@advplyr commented on GitHub (Jul 21, 2023):

Added in v2.3.0

@advplyr commented on GitHub (Jul 21, 2023): Added in v2.3.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1227