Hello ! When i execute the systemctl stop kumomta.service or systemctl restart kumomta.service command, it hangs for approx 5 minutes before stopping the service, i have seen some similar reports in the Discord, do you have an idea why ? In total i had 2 installation of kumomta on 2 different machines, from my experience it seems that in the beginning everything works fine, but if you start to make several restarts in a row, the issue will show up.
This issue is happening in our testing env, so it has very little load
Logs :
2025-04-01T09:11:06.286099Z INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:2525 -> stopping
2025-04-01T09:11:06.286188Z INFO qmaint-0 kumod::ready_queue: queue_config_maintainer stopping
2025-04-01T09:11:06.287393Z INFO qmaint-0 kumod::queue: queue_config_maintainer stopping
2025-04-01T09:15:38.611822Z INFO main kumo_server_common::start: Shutdown completed OK!
2025-04-01T09:15:38.626678Z INFO main kumod::spool: Shutting down spool
2025-04-01T09:15:38.626987Z INFO main kumod::spool: data shutdown completed in 170.949µs
2025-04-01T09:15:38.627003Z INFO main kumod::spool: meta shutdown completed in 149.111µs
2025-04-01T09:15:38.627389Z INFO main kumod: application logic complete, returning from main
It seems that if kumo has been running for a while (a dozen minutes i’d say), the systemctl stop kumomta.service will be executed almost instantly, but if just after that stop, i start & try to stop the service again, this time the systemctl stop kumomta.service command will hang for 5 minutes
Connections are not instantly terminated when restarting or shutting down, they are allowed to complete their timeouts. That is the most typical cause.
It sounds like you have a misconfiguration somewhere. 5 minutes is the systemd timeout so you will probably find that if you trace the journal in debug mode you will see whatever is thrashing around and a final SIGKILL, which should never happen if it is configured correctly.