sni / mod_gearman

Distribute Naemon Host/Service Checks & Eventhandler with Gearman Queues. Host/Servicegroups affinity included.
http://www.mod-gearman.org
GNU General Public License v3.0
122 stars 42 forks source link

systemd takes 2min to stop mod_gearman_worker #159

Closed dirtyren closed 2 years ago

dirtyren commented 3 years ago

I could not find why, systemctl stop mod-gearman-worker takes almost 2min to finish, although in 10s all the mod_gearman processes and zombies are gone and the service queue in gearman_top is with 0 workers and 0 jobs running It is not a check that is waiting to finish.

I am running mod-gearman-worker 3.3.3 on CentOS 8 Stream.

time systemctl stop mod-gearman-worker real 1m44.117s user 0m0.012s sys 0m0.011s

Logs Jul 27 16:01:57 opdev3 systemd[1]: Stopping Mod-Gearman Worker... Jul 27 16:03:41 opdev3 systemd[1]: mod-gearman-worker.service: State 'stop-final-sigterm' timed out. Killing. Jul 27 16:03:41 opdev3 systemd[1]: mod-gearman-worker.service: Killing process 167235 (op-snmp-interfa) with signal SIGKILL. Jul 27 16:03:41 opdev3 systemd[1]: mod-gearman-worker.service: Killing process 171308 (op-snmp-interfa) with signal SIGKILL. Jul 27 16:03:41 opdev3 systemd[1]: mod-gearman-worker.service: Killing process 171371 (op-snmp-interfa) with signal SIGKILL. Jul 27 16:03:41 opdev3 systemd[1]: mod-gearman-worker.service: Failed with result 'timeout'. Jul 27 16:03:41 opdev3 systemd[1]: Stopped Mod-Gearman Worker.

Any idea? Any extra info just let me know.

Tks.

sni commented 3 years ago

pending checks would have been my first guess as well. Is this the c worker or the go worker?

dirtyren commented 3 years ago

It is the C workler, with the Go worker I have the the denial of service from geramand, described here https://github.com/ConSol/mod-gearman-worker-go/issues/9 It not pending checks, at least 10 seconds after the stop has started, all processes, jobs running, workers and zombies are all gone.

Tks.