linuxserver / docker-jackett

GNU General Public License v3.0
394 stars 95 forks source link

100% cpu usage (1 core) until restarted #34

Closed IncognitoCore closed 6 years ago

IncognitoCore commented 6 years ago

| Host OS | LimeTech unRAID 6.3.5 | | Template | screenshot link | | Docker log | log link |

I'm seeing 100% cpu usage (which is 100% of the total 400%, since I have 4 cores) when Jackett is running for a while. I'm seeing this issue since I've installed Jackett (4-5 months or something). It happens around twice a week I think.

A friend of mine is also seeing this issue, so it's not limitted to my setup.

The only way to stop Jackett from using up to 100% cpu is to restart the docker container in the unRAID GUI. I've also found out that when its running at 100% cpu, other dockers, like Transmission, cannot find leechers/peers anymore, so Jackett is really hanging.

rosshettel commented 6 years ago

I've run into this as well

Redsandro commented 6 years ago

Not sure if this is docker, mono, or jackett related. But I've run into this as well. I have other containers running mono without this particular issue, so I think this is a special case with jackett + mono.

See https://github.com/Jackett/Jackett/issues/2198

rosshettel commented 6 years ago

Thanks, I'll follow there too

IncognitoCore commented 6 years ago

It seems like I have this problem more often now. Happened once every two weeks before, now it's happening every 1-2 days here...

im-mortal commented 6 years ago

Same here. It's not 100%, though, more like around ~80%, but still pretty much high. Image attached: jackett resource consumption before and after container reboot.

Spoiler

Perhaps not related (or is it?), but I notice similar behavior with Sonarr container by linuxserver every once in a while as well.

rosshettel commented 6 years ago

Someone posted a suggestion in https://github.com/Jackett/Jackett/issues/2198 to try turning off the auto update feature within Jackett, as that might be the cause

kaso17 commented 6 years ago

I'm not sure about the init system used by the docker container. Any chance that it there's something which will try to automatically restart jackett if it crashes? e.g. system.d with Restart=always?

im-mortal commented 6 years ago

@rosshettel Thank you! Turned the auto update off, haven't noticed Jackett misbehaving since then. @kaso17 Typically, that problem is solved with a supervisor like S6 Overlay within a container. Jackett is being started via a service script using S6's framework.

kaso17 commented 6 years ago

I assume S6 is automatically restarting it then. You might want to add "--NoRestart" to the arguments to prevent the jackett updater from restarting jackett.

IncognitoCore commented 6 years ago

Turning off auto update did solve the issue for me as well (I've not seen cpu issues in the last 3 weeks).

Zuescho commented 6 years ago

Just noticed the same Problem, will try to turn auto updates off and report back if it fixed it for me.

aSaltyPirate commented 6 years ago

None of the other solutions were working for me, and then I found that the user I had running Jackett via systemd only had read and execute privileges, not write privileges for the directory the Jackett files were located. I'm no expert but if I had to guess, even though I turned auto update off it was trying to update but failed since it didn't have write permissions to it's own directory.