theotherp / nzbhydra2

Usenet meta search
Other
1.23k stars 75 forks source link

BUG nzbhydra crashes frequently (out of memory?) #754

Open pproba opened 2 years ago

pproba commented 2 years ago

logs: https://ufile.io/vt5ypzg2

OS: Windows 10 21H2 nzbhydra2: v4.0.1

Since maybe 2 weeks, nzbhydra crashes or at least becomes unresponsive, maybe every other day. It doesn't respond to API requests from sonarr or radarr anymore and the webserver doesn't respond anymore either. The service is still running though. When I restart the service, everything is working fine for at least the next 24 hours.

I've already received the pop-up message telling me to increase the JVM's memory (Xmx), and I did double it. Unfortunately it's still happening.

I could increase it even more now, but I've been running nzbhydra2 for a really long time now without it ever crashing. Please let me know if you find something suspicious in the logs or if I should just go ahead and increase Xmx until it stops crashing.

Yes, I just need to let it run for one or two days.

theotherp commented 2 years ago

The Xmx value in the main config is still 256 and it looks like you haven't changed it. But 256 should be enough anyway.

You can try installing a newer java version like 17: https://adoptium.net/ That may help.

Also before you do that please go to the bugreport section and click the "Create heap dump" button. You should get a file download. Zip it and upload it to https://ufile.io. That should allow me to see what makes up the memory. Ideally do that after the process has been running some time. If the button does nothing (give it a minute) that's fine, it may not always work.

pproba commented 2 years ago

Is 256MB the default? I really thought I've doubled it and saved it.

I've uploaded a heap dump: https://ufile.io/1bi8lebx The process has been running for a while now (~48 hours).

I'm going to update the java version.

Thanks for looking into this!

theotherp commented 2 years ago
  1. Shut down hydra
  2. Replace the file in the lib folder with this one: https://ufile.io/ghv53sgj
  3. Start hydra.

I've identified a memory issue which is small but might help a bit. Otherwise the file you sent me looks fine. Unfortunately if there is a memory leak (i.e. something causing the memory usage to grow beyond normal) I can't see it and would need a dump from that time. See if you can create it the next time the program crashes but before restarting it. Or perhap a new java version and this fix are already enough.

pproba commented 2 years ago

Okay, I've replaced the file. Let's see what will happen. Thanks again for taking the time to look into this and trying to help me, I really appreciate it!

It might also be that I've involuntarily filled some sort of cache with lots of search results after I've maxed out my indexers' API request limits for 3 or 4 days straight.

Will this snapshot 4.0.3 version auto-update to the official 4.0.3 version once it's released?