audiobookshelf
audiobookshelf copied to clipboard
[Bug]: Downloading Podcast Episodes per CronManager results in Server Restart
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:
Steps to reproduce the issue
- Have same Audiobooks as me
- download every episode until like 27th of April 2024
- Set every podcast to hourly autodownload
- wait
- 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 -----
Can you check for /metadata/crash_logs.txt or look in the Docker logs?
updated the initial issue with both log files
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.
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.
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