CLOSE_WAIT / defunct process

Sonarr version (exact version): v2.0.0.4427
Mono version (if Sonarr is not running on Windows): Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 14 10:53:45 UTC 2016)
OS: Centos 7
((Debug logs)):
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue: Sometimes when browsing parts of the site stops working. You can navigate through but data doesn’t show up and you get those spinning balls. When that happens and you initiate a service restart it does not properly close the sockets and processes. Then leaving a defunct process with the socket/port open and unable to respawn/relaunch. It also then leaves several CLOSE_WAITS with the only option to restart the system. I will run it again in debug mode to see if I can catch it again.

#netstat -nap |grep -i 8989
tcp 24 0 0.0.0.0:8989 0.0.0.0:* LISTEN -
tcp 995 0 1.1.1.1:8989 2.2.2.2:50106 CLOSE_WAIT -
tcp 1007 0 1.1.1.1:8989 2.2.2.2:50105 CLOSE_WAIT -
tcp 1075 0 1.1.1.1:8989 2.2.2.2:50104 CLOSE_WAIT -
tcp 1 0 1.1.1.1:8989 2.2.2.2:49842 CLOSE_WAIT -
etc
etc

ps -ef |grep sonarr

sonarr 910 1 0 Dec28 ? 00:03:51 [Main]

Is mono crashing? Capturing the standard output/error of the mono process to a file would be the easiest way to determine that because mono crashing might not be logged to Sonarr’s logs (since mono takes Sonarr down with it).

Will add the following to my service file. Lets see how it goes. If there is a better way please let me know.

ExecStart=/usr/bin/mono /home/sonarr/sonarr/NzbDrone.exe -nobrowser --data /home/sonarr/data/.sonarr --debug ‘>&’ /home/sonarr/sonarr_stdout.txt

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.