[Bug]: Downloading Podcast Episodes per CronManager results in Server Restart #1921

Closed
opened 2026-04-25 00:01:24 +02:00 by adam · 5 comments
Owner

Originally created by @BelphegorPrime on GitHub (Apr 30, 2024).

Describe the issue

I have all my Podcasts on an hourly auto download interval.
Just recently I discovered that there should be new episodes of my daily releasing podcast but there wheren't any arond.
So I looked in the logs and foud out that the server is restarting every hour.

It could be either the "questcast" episode, "Magic: The Gathering Drive to Work Podcast" check or anything else.

here are the logs with debug mode enabled:

logs.txt

Steps to reproduce the issue

  1. Have same Audiobooks as me
  2. download every episode until like 27th of April 2024
  3. Set every podcast to hourly autodownload
  4. wait
  5. check logs

Audiobookshelf version

v2.9.0

How are you running audiobookshelf?

Docker

EDIT:

here is the crash_logs.txt
crash_logs.txt

and here is the docker containers log
_audiobookshelf_logs.txt
it looks like something takes all the memory

<--- Last few GCs --->
[7:0x76eaa7b12020]  3594615 ms: Mark-Compact 4091.7 (4131.0) -> 4091.5 (4133.0) MB, 604.47 / 0.00 ms  (average mu = 0.343, current mu = 0.016) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
Originally created by @BelphegorPrime on GitHub (Apr 30, 2024). ### Describe the issue I have all my Podcasts on an hourly auto download interval. Just recently I discovered that there should be new episodes of my daily releasing podcast but there wheren't any arond. So I looked in the logs and foud out that the server is restarting every hour. It could be either the "questcast" episode, "Magic: The Gathering Drive to Work Podcast" check or anything else. here are the logs with debug mode enabled: [logs.txt](https://github.com/advplyr/audiobookshelf/files/15158212/logs.txt) ### Steps to reproduce the issue 1. Have same Audiobooks as me 2. download every episode until like 27th of April 2024 3. Set every podcast to hourly autodownload 4. wait 5. check logs ### Audiobookshelf version v2.9.0 ### How are you running audiobookshelf? Docker EDIT: here is the crash_logs.txt [crash_logs.txt](https://github.com/advplyr/audiobookshelf/files/15158336/crash_logs.txt) and here is the docker containers log [_audiobookshelf_logs.txt](https://github.com/advplyr/audiobookshelf/files/15158371/_audiobookshelf_logs.txt) it looks like something takes all the memory ``` <--- Last few GCs ---> [7:0x76eaa7b12020] 3594615 ms: Mark-Compact 4091.7 (4131.0) -> 4091.5 (4133.0) MB, 604.47 / 0.00 ms (average mu = 0.343, current mu = 0.016) allocation failure; scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace ----- ```
adam added the bug label 2026-04-25 00:01:24 +02:00
adam closed this issue 2026-04-25 00:01:24 +02:00
Author
Owner

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

Can you check for /metadata/crash_logs.txt or look in the Docker logs?

@nichwall commented on GitHub (Apr 30, 2024): Can you check for `/metadata/crash_logs.txt` or look in the Docker logs?
Author
Owner

@BelphegorPrime commented on GitHub (Apr 30, 2024):

updated the initial issue with both log files

@BelphegorPrime commented on GitHub (Apr 30, 2024): updated the initial issue with both log files
Author
Owner

@BelphegorPrime commented on GitHub (Apr 30, 2024):

Interesting I checked the other daily logs for the "=== Starting Server ==="-message and found out they occur since 2024-04-29 and the special thing that happend before the forcefull restart was a [LibraryScanner] Starting library scan 5a5c06f8-0f18-4395-8483-f291bdcace4a for Podcasts message.

Could that be related?

EDIT:
I did a manual scan of my podcast library and it looks like the mentioned "questcast" episode was dowloaded multiple times but it looks like incomplete if you look at the duration of the individual tracks.

image

@BelphegorPrime commented on GitHub (Apr 30, 2024): Interesting I checked the other daily logs for the "=== Starting Server ==="-message and found out they occur since 2024-04-29 and the special thing that happend before the forcefull restart was a `[LibraryScanner] Starting library scan 5a5c06f8-0f18-4395-8483-f291bdcace4a for Podcasts` message. Could that be related? EDIT: I did a manual scan of my podcast library and it looks like the mentioned "questcast" episode was dowloaded multiple times but it looks like incomplete if you look at the duration of the individual tracks. ![image](https://github.com/advplyr/audiobookshelf/assets/3178520/634dfac0-44c3-4a45-a4af-9283a2a6f9a1)
Author
Owner

@BelphegorPrime commented on GitHub (May 2, 2024):

After doing the scan and cleaning up the falsly downloaded podcast episodes the auto download of the podcast episodes works again.

My problem is solved, but the cause is still unfixed.

@BelphegorPrime commented on GitHub (May 2, 2024): After doing the scan and cleaning up the falsly downloaded podcast episodes the auto download of the podcast episodes works again. My problem is solved, but the cause is still unfixed.
Author
Owner

@advplyr commented on GitHub (May 20, 2024):

Your initial error was running out of memory in the docker container. We are still working on improving the new data model to reduce the amount we need to load into memory.
In the meantime you can set environment variables in your docker run config to increase the memory
See https://github.com/advplyr/audiobookshelf/issues/1926#issuecomment-1639020501

@advplyr commented on GitHub (May 20, 2024): Your initial error was running out of memory in the docker container. We are still working on improving the new data model to reduce the amount we need to load into memory. In the meantime you can set environment variables in your docker run config to increase the memory See https://github.com/advplyr/audiobookshelf/issues/1926#issuecomment-1639020501
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1921