mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-28 17:26:14 +00:00
The issue here is: * If a connection limit was hit (eg: TooManyLeases) then the readyq maintainer completes its work for that one wakeup * readyq maintainer then goes to sleep until either 10 minutes have elapsed, or a new message is moved into the ready queue * If the system either has no new messages being injected to that queue, or all of the messages are currently ready, then those messages will camp out in the ready queue until 10 minutes have elapsed before we try to make another connection. This hampers the rate of egress. What this commit does is: * Introduce a QueueState concept where we can indicate a kind of "status effect" that applies to a queue. The state has some human readable context and a time for when the effect was most recently observed. * Adds a `connection_limited` state to indicate when we've hit a connection limit and a `connection_rate_throttled` state when we've hit the max_connection_rate. * The ready queue maintainer will reduce its wakeup interval if it observes that connections have been limited, so that we can wakeup sooner. In a separate commit, an API endpoint will be added to expose these queue states and augment the summary command output.