[Bug]: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory #2451

Open
opened 2026-04-25 00:07:18 +02:00 by adam · 2 comments
Owner

Originally created by @JaegerMaster on GitHub (Jan 1, 2025).

What happened?

Audiobookshelf installation crashes due to out of memory limitations

What did you expect to happen?

NA

Steps to reproduce the issue

  1. Run the scanner for library consisting of approx 75K audiobooks

Audiobookshelf version

v2.17.6

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?

Firefox

Logs

<--- Last few GCs --->

[7:0x7f78a1485660]  6308217 ms: Scavenge 4041.5 (4123.3) -> 4041.1 (4134.0) MB, 9.92 / 0.00 ms  (average mu = 0.590, current mu = 0.207) allocation failure; 
[7:0x7f78a1485660]  6308266 ms: Scavenge 4047.8 (4134.0) -> 4047.1 (4134.8) MB, 9.46 / 0.00 ms  (average mu = 0.590, current mu = 0.207) allocation failure; 
[7:0x7f78a1485660]  6308291 ms: Scavenge 4048.8 (4134.8) -> 4047.7 (4155.8) MB, 15.33 / 0.00 ms  (average mu = 0.590, current mu = 0.207) allocation failure; 


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Additional Notes

No response

Originally created by @JaegerMaster on GitHub (Jan 1, 2025). ### What happened? Audiobookshelf installation crashes due to out of memory limitations ### What did you expect to happen? NA ### Steps to reproduce the issue 1. Run the scanner for library consisting of approx 75K audiobooks ### Audiobookshelf version v2.17.6 ### 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? Firefox ### Logs ```shell <--- Last few GCs ---> [7:0x7f78a1485660] 6308217 ms: Scavenge 4041.5 (4123.3) -> 4041.1 (4134.0) MB, 9.92 / 0.00 ms (average mu = 0.590, current mu = 0.207) allocation failure; [7:0x7f78a1485660] 6308266 ms: Scavenge 4047.8 (4134.0) -> 4047.1 (4134.8) MB, 9.46 / 0.00 ms (average mu = 0.590, current mu = 0.207) allocation failure; [7:0x7f78a1485660] 6308291 ms: Scavenge 4048.8 (4134.8) -> 4047.7 (4155.8) MB, 15.33 / 0.00 ms (average mu = 0.590, current mu = 0.207) allocation failure; <--- JS stacktrace ---> FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:07:18 +02:00
Author
Owner

@nichwall commented on GitHub (Jan 1, 2025):

Does the library only have audiobooks? So not ebook files? How many files are in the library? Do you have any logs from before the crash?

You can increase the amount of memory for the node process using the steps here: https://github.com/advplyr/audiobookshelf/issues/3338#issuecomment-2323382459

@nichwall commented on GitHub (Jan 1, 2025): Does the library only have audiobooks? So not ebook files? How many files are in the library? Do you have any logs from before the crash? You can increase the amount of memory for the node process using the steps here: https://github.com/advplyr/audiobookshelf/issues/3338#issuecomment-2323382459
Author
Owner

@JaegerMaster commented on GitHub (Jan 4, 2025):

Hi, @nichwall Thanks

There are only audiobooks in the library approx 70K.

There were nothing else in the logs other than what I posted.

I increased the memory size to 8GB and is working properly at present.

@JaegerMaster commented on GitHub (Jan 4, 2025): Hi, @nichwall Thanks There are only audiobooks in the library approx 70K. There were nothing else in the logs other than what I posted. I increased the memory size to 8GB and is working properly at present.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2451