[Bug]: Failed/hanged podcast episode download blocking download queue forever #2659

Open
opened 2026-04-25 00:09:22 +02:00 by adam · 16 comments
Owner

Originally created by @lamons on GitHub (Mar 14, 2025).

What happened?

When a download stuck for some reason (I suppose due to network issue or host-side issue), the "downloading episode x" status will hang forever and thus block all following download task, until a restart of abs.

What did you expect to happen?

Solutions I can think of:

  1. A timeout mechanism for downloading tasks, retry/abort the task when the download progress does not change for a certain time. Maybe move the retry task to the bottom of the download queue to prevent dead loop, or set a max retry count.
  2. An option to manually retry/abort download tasks.

Steps to reproduce the issue

Happened quite randomly in my case, could be any episode download task. More likely when I try to download a bunch of past episodes of one podcast at once, maybe some host have rate limit.

Audiobookshelf version

v2.19.5

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs


Additional Notes

No response

Originally created by @lamons on GitHub (Mar 14, 2025). ### What happened? When a download stuck for some reason (I suppose due to network issue or host-side issue), the "downloading episode x" status will hang forever and thus block all following download task, until a restart of abs. ### What did you expect to happen? Solutions I can think of: 1. A timeout mechanism for downloading tasks, retry/abort the task when the download progress does not change for a certain time. Maybe move the retry task to the bottom of the download queue to prevent dead loop, or set a max retry count. 2. An option to manually retry/abort download tasks. ### Steps to reproduce the issue Happened quite randomly in my case, could be any episode download task. More likely when I try to download a bunch of past episodes of one podcast at once, maybe some host have rate limit. ### Audiobookshelf version v2.19.5 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:09:22 +02:00
Author
Owner

@nichwall commented on GitHub (Mar 14, 2025):

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

@nichwall commented on GitHub (Mar 14, 2025): Duplicate of https://github.com/advplyr/audiobookshelf/issues/4098
Author
Owner

@lamons commented on GitHub (Mar 14, 2025):

Duplicate of #4098

Not sure if it's dupe to this, since in my case other cron job (such as checking for new episodes) can still run, it is only the download queue stucking.

@lamons commented on GitHub (Mar 14, 2025): > Duplicate of [#4098](https://github.com/advplyr/audiobookshelf/issues/4098) Not sure if it's dupe to this, since in my case other cron job (such as checking for new episodes) can still run, it is only the download queue stucking.
Author
Owner

@nichwall commented on GitHub (Mar 14, 2025):

Can you provide some server logs of this happening?

@nichwall commented on GitHub (Mar 14, 2025): Can you provide some server logs of this happening?
Author
Owner

@lamons commented on GitHub (Mar 14, 2025):

{"timestamp":"2025-03-13 19:20:50.049","source":"fileUtils.js:300","message":"[fileUtils] Downloading file to /podcasts/subscriptions/demo/#57.m4a","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:20:56.313","source":"fileUtils.js:330","message":"[fileUtils] File \"#57.m4a\" download progress: 90% (156545568/174903509 bytes)","levelName":"DEBUG","level":1}
...
{"timestamp":"2025-03-13 19:20:56.822","source":"fileUtils.js:330","message":"[fileUtils] File \"#57.m4a\" download progress: 100% (174043680/174903509 bytes)","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:20:56.992","source":"libraryItemsPodcastFilters.js:104","message":"[LibraryItemsPodcastFilters] podcastEpisode.afterCreate: Clearing count cache","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:20:56.992","source":"ApiCacheManager.js:20","message":"[ApiCacheManager] podcastEpisode.afterCreate: Clearing cache","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:20:56.999","source":"ApiCacheManager.js:20","message":"[ApiCacheManager] libraryItem.afterUpdate: Clearing cache","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:20:57.006","source":"ApiCacheManager.js:20","message":"[ApiCacheManager] podcast.afterUpdate: Clearing cache","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:20:57.008","source":"PodcastManager.js:157","message":"[PodcastManager] Successfully downloaded podcast episode \"#57\"","levelName":"INFO","level":2}
+ {"timestamp":"2025-03-13 19:20:57.010","source":"fileUtils.js:300","message":"[fileUtils] Downloading file to /podcasts/subscriptions/demo/#56.m4a","levelName":"DEBUG","level":1} 
{"timestamp":"2025-03-13 19:24:51.129","source":"ApiCacheManager.js:48","message":"[ApiCacheManager] count: 0 size: 0","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:24:51.133","source":"ApiCacheManager.js:59","message":"[ApiCacheManager] Cache miss: {\"user\":\"root\",\"url\":\"/libraries/e32af55a-e0c9-4711-9fd4-0a4d2e249589?include=filterdata\"}","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:24:51.258","source":"ApiCacheManager.js:48","message":"[ApiCacheManager] count: 1 size: 2554","levelName":"DEBUG","level":1}
{"timestamp":"2025-03-13 19:24:51.280","source":"LibraryItem.js:369","message":"Loaded 9 of 34 items for \"Continue Listening/Reading\" in 0.02s","levelName":"DEBUG","level":1}

It was something like this, no obvious error message, but usually when a download initiated, there will be following log entries indicating the download progress. But for the "stuck" download, as in the marked line, nothing after the "Downloading file to" message. Other crob jobs were still running fine.

Meanwhile I can see the spinning icon on the top of the ABS page with "Downloading episode # 56" message, and the episode on the top of Current Downloads list. Other auto download task will still be added to the queue but just piled under the stuck one.

@lamons commented on GitHub (Mar 14, 2025): ```json {"timestamp":"2025-03-13 19:20:50.049","source":"fileUtils.js:300","message":"[fileUtils] Downloading file to /podcasts/subscriptions/demo/#57.m4a","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:20:56.313","source":"fileUtils.js:330","message":"[fileUtils] File \"#57.m4a\" download progress: 90% (156545568/174903509 bytes)","levelName":"DEBUG","level":1} ... {"timestamp":"2025-03-13 19:20:56.822","source":"fileUtils.js:330","message":"[fileUtils] File \"#57.m4a\" download progress: 100% (174043680/174903509 bytes)","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:20:56.992","source":"libraryItemsPodcastFilters.js:104","message":"[LibraryItemsPodcastFilters] podcastEpisode.afterCreate: Clearing count cache","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:20:56.992","source":"ApiCacheManager.js:20","message":"[ApiCacheManager] podcastEpisode.afterCreate: Clearing cache","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:20:56.999","source":"ApiCacheManager.js:20","message":"[ApiCacheManager] libraryItem.afterUpdate: Clearing cache","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:20:57.006","source":"ApiCacheManager.js:20","message":"[ApiCacheManager] podcast.afterUpdate: Clearing cache","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:20:57.008","source":"PodcastManager.js:157","message":"[PodcastManager] Successfully downloaded podcast episode \"#57\"","levelName":"INFO","level":2} + {"timestamp":"2025-03-13 19:20:57.010","source":"fileUtils.js:300","message":"[fileUtils] Downloading file to /podcasts/subscriptions/demo/#56.m4a","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:24:51.129","source":"ApiCacheManager.js:48","message":"[ApiCacheManager] count: 0 size: 0","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:24:51.133","source":"ApiCacheManager.js:59","message":"[ApiCacheManager] Cache miss: {\"user\":\"root\",\"url\":\"/libraries/e32af55a-e0c9-4711-9fd4-0a4d2e249589?include=filterdata\"}","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:24:51.258","source":"ApiCacheManager.js:48","message":"[ApiCacheManager] count: 1 size: 2554","levelName":"DEBUG","level":1} {"timestamp":"2025-03-13 19:24:51.280","source":"LibraryItem.js:369","message":"Loaded 9 of 34 items for \"Continue Listening/Reading\" in 0.02s","levelName":"DEBUG","level":1} ``` It was something like this, no obvious error message, but usually when a download initiated, there will be following log entries indicating the download progress. But for the "stuck" download, as in the marked line, nothing after the "Downloading file to" message. Other crob jobs were still running fine. Meanwhile I can see the spinning icon on the top of the ABS page with "Downloading episode # 56" message, and the episode on the top of Current Downloads list. Other auto download task will still be added to the queue but just piled under the stuck one.
Author
Owner

@PhantomPhoton commented on GitHub (Mar 15, 2025):

I ran into this last night as well.

ffmpeg failed around 25856 kB with

ERROR: [FfmpegHelpers] downloadPodcastEpisode: Error Error: Input stream error: aborted

which ABS attempted to retry via fileUtils

INFO: [PodcastManager] Retrying episode download without tagging
DEBUG: [fileUtils] Downloading file to /podcasts/Taskmaster The Podcast/Ep 197. Brynley Stent - TM NZ S2 Ep.7 (a6fa2213-141a-4830-867a-4a5d205d1e7a).mp3

fileUtils ran until around 26902528 bytes and then froze, no additional output

DEBUG: [fileUtils] File "Ep 197. Brynley Stent - TM NZ S2 Ep.7 (a6fa2213-141a-4830-867a-4a5d205d1e7a).mp3" download progress: 55% (26902528/49347186 bytes)

Everything else works fine, new episodes are queued up behind the stuck download. It does look like maybe there's something less then ideal in the fileUtils download code path.

@PhantomPhoton commented on GitHub (Mar 15, 2025): I ran into this last night as well. ffmpeg failed around 25856 kB with ``` ERROR: [FfmpegHelpers] downloadPodcastEpisode: Error Error: Input stream error: aborted ``` which ABS attempted to retry via fileUtils ``` INFO: [PodcastManager] Retrying episode download without tagging DEBUG: [fileUtils] Downloading file to /podcasts/Taskmaster The Podcast/Ep 197. Brynley Stent - TM NZ S2 Ep.7 (a6fa2213-141a-4830-867a-4a5d205d1e7a).mp3 ``` fileUtils ran until around 26902528 bytes and then froze, no additional output ``` DEBUG: [fileUtils] File "Ep 197. Brynley Stent - TM NZ S2 Ep.7 (a6fa2213-141a-4830-867a-4a5d205d1e7a).mp3" download progress: 55% (26902528/49347186 bytes) ``` Everything else works fine, new episodes are queued up behind the stuck download. It does look like maybe there's something less then ideal in the fileUtils download code path.
Author
Owner

@PhantomPhoton commented on GitHub (Mar 15, 2025):

After a restart of ABS, the download of the episode fails the same way, but doesn't get stuck,

ERROR: [fileUtils] Failed to download file "/podcasts/Taskmaster The Podcast/Ep 197. Brynley Stent - TM NZ S2 Ep.7 (c75300c1-cce8-42f0-af85-d3531cb388b6).mp3" [AxiosError: timeout of 30000ms exceeded]

https://feeds.captivate.fm/taskmaster-the-podcast/ is the podcast feed, episode Ep 197. Brynley Stent - TM NZ S2 Ep.7 is the one that's failing for me.

@PhantomPhoton commented on GitHub (Mar 15, 2025): After a restart of ABS, the download of the episode fails the same way, but doesn't get stuck, ``` ERROR: [fileUtils] Failed to download file "/podcasts/Taskmaster The Podcast/Ep 197. Brynley Stent - TM NZ S2 Ep.7 (c75300c1-cce8-42f0-af85-d3531cb388b6).mp3" [AxiosError: timeout of 30000ms exceeded] ``` `https://feeds.captivate.fm/taskmaster-the-podcast/` is the podcast feed, episode ` Ep 197. Brynley Stent - TM NZ S2 Ep.7` is the one that's failing for me.
Author
Owner

@PhantomPhoton commented on GitHub (Mar 15, 2025):

After downloading a few other podcast episodes, re-attempting the taskmaster episodes freezes the queue again. Hopefully it's reproducible for others!

@PhantomPhoton commented on GitHub (Mar 15, 2025): After downloading a few other podcast episodes, re-attempting the taskmaster episodes freezes the queue again. Hopefully it's reproducible for others!
Author
Owner

@tiehichi commented on GitHub (Apr 16, 2025):

I have encountered the same issue with version 2.20-Docker. Based on the DEBUG logs, there are no error messages, but the download task gets stuck at a random percentage, which blocks subsequent download tasks. The only solution is to restart the ABS

@tiehichi commented on GitHub (Apr 16, 2025): I have encountered the same issue with version `2.20-Docker`. Based on the `DEBUG` logs, there are no error messages, but the download task gets stuck at a random percentage, which blocks subsequent download tasks. The only solution is to restart the ABS
Author
Owner

@deanishe commented on GitHub (Sep 4, 2025):

Also having this issue. The bigger problem for me is that all the blocked episodes still in the queue get dropped on the floor on restart and never get re-queued.

On next refresh, ABS has completely forgotten it was supposed to download them and treats them like old episodes.

@deanishe commented on GitHub (Sep 4, 2025): Also having this issue. The bigger problem for me is that all the blocked episodes still in the queue get dropped on the floor on restart and never get re-queued. On next refresh, ABS has completely forgotten it was supposed to download them and treats them like old episodes.
Author
Owner

@serkef commented on GitHub (Sep 10, 2025):

I have the same issue - The queue gets stuck, I cannot tell from the logs why. When I restart the server the queue is gone.

@serkef commented on GitHub (Sep 10, 2025): I have the same issue - The queue gets stuck, I cannot tell from the logs why. When I restart the server the queue is gone.
Author
Owner

@nichwall commented on GitHub (Sep 11, 2025):

What server version is this happening with? This issue was originally reported with server version 2.19.5, with a fix for the download queue getting stuck being released in 2.25.1 and several people reporting the issue was fixed for them. The latest version of the server is 2.29.0 at the time of writing.
https://github.com/advplyr/audiobookshelf/releases/tag/v2.25.1

@nichwall commented on GitHub (Sep 11, 2025): What server version is this happening with? This issue was originally reported with server version 2.19.5, with a fix for the download queue getting stuck being released in 2.25.1 and several people reporting the issue was fixed for them. The latest version of the server is 2.29.0 at the time of writing. https://github.com/advplyr/audiobookshelf/releases/tag/v2.25.1
Author
Owner

@esologic commented on GitHub (Sep 22, 2025):

This is also happening for me on 2.29.0

@esologic commented on GitHub (Sep 22, 2025): This is also happening for me on 2.29.0
Author
Owner

@Vito0912 commented on GitHub (Sep 22, 2025):

Can you please provide logs when this is happening

@Vito0912 commented on GitHub (Sep 22, 2025): Can you please provide logs when this is happening
Author
Owner

@Skoobie-Deux commented on GitHub (Feb 26, 2026):

Happening to me as well on latest version. For now, I have a cron job restarting the service every few hours so that ideally only a small number of episodes get dropped without being readded when it starts back up. Would love to see this actually fixed.

@Skoobie-Deux commented on GitHub (Feb 26, 2026): Happening to me as well on latest version. For now, I have a cron job restarting the service every few hours so that ideally only a small number of episodes get dropped without being readded when it starts back up. Would love to see this actually fixed.
Author
Owner

@nichwall commented on GitHub (Feb 27, 2026):

What server version is this happening with? This issue was originally reported with server version 2.19.5, with a fix for the download queue getting stuck being released in 2.25.1 and several people reporting the issue was fixed for them. The latest version of the server is 2.29.0 at the time of writing.
https://github.com/advplyr/audiobookshelf/releases/tag/v2.25.1

Do you have any logs of this happening from after 2.25.1?

@nichwall commented on GitHub (Feb 27, 2026): > What server version is this happening with? This issue was originally reported with server version 2.19.5, with a fix for the download queue getting stuck being released in 2.25.1 and several people reporting the issue was fixed for them. The latest version of the server is 2.29.0 at the time of writing. > https://github.com/advplyr/audiobookshelf/releases/tag/v2.25.1 Do you have any logs of this happening from after 2.25.1?
Author
Owner

@Skoobie-Deux commented on GitHub (Feb 27, 2026):

Here are my logs from yesterday when it happened with NPR News. Version 2.32.1.

2026-02-26.txt

@Skoobie-Deux commented on GitHub (Feb 27, 2026): Here are my logs from yesterday when it happened with NPR News. Version 2.32.1. [2026-02-26.txt](https://github.com/user-attachments/files/25612975/2026-02-26.txt)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2659