Stopping KumoMTA sometimes results in Failed with result 'timeout' after 5 minutes - full log here: https://paste.mozilla.org/aWb1ft6j
Is there anything I can do to fix this? or should I just ignore this error?
Stopping KumoMTA sometimes results in Failed with result 'timeout' after 5 minutes - full log here: https://paste.mozilla.org/aWb1ft6j
Is there anything I can do to fix this? or should I just ignore this error?
I don’t think you are, but for the sake of others searching and finding this in the future: if you are using deferred_spool=true, this is a potentially serious situation where you may lose accountability for messages, because the process is potentially being killed before it has a chance to safely shut down and flush the deferred spool. I generally recommend against using deferred_spool; the recommended rocksdb spool gives a great balance of accountability and performance.
Otherwise, the more likely cause of this is: you have a lot of in-flight connections at the time you requested shutdown, and the various timeout parameters exceed the grace period that systemd allows for shutting down the service.
There are two ways to tackle this:
idle_timeout, data_timeout and data_dot_timeout to ensure that they are less than that 5 minute period.kumomta.service to increase the TimeoutStopSecAnother related possibility is that you are using lua delivery handlers and some of those are blocked waiting for a response. We don’t explicitly set a timeout on the request object, so this may be a fairly likely factor here. I added a default 1 minute timeout and make it possible to configure the timeout as part of kumo.http: add a default 1 minute timeout to requests · KumoCorp/kumomta@580be2c · GitHub
Thanks Wez. I’m not using deferred_spool - I do have some connections for saving the message data and log events, maybe those are causing it? I don’t think they would ever take 5 minutes to be done, they just accept the data and write it into a database..