There are certain workloads and traffic patterns that can result in shutdown taking a long time to complete. It's not generally clear to the user what is happening there, so it is desirable to improve that somehow. During some recent testing I observed that the rust logic had completed and that the kumod was process was blocked waiting for an atexit handler that was joining a rocksdb thread. This commit introduces an explicit shutdown concept to the spool abstraction and spool manager. After we have shutdown all in-flight messages and logs, we now ask the spool manager to shutdown. It will steal away the global refs to the meta and data spools and, concurrently, ask them to shutdown, and then drop them. For rocksdb, the shutdown request consists of asking it to cancel any background work. For the plain files spool, shutdown is a NOP. We print out how long it took to perform the shutdown per spool, as well as indicate when we start to shutdown the spool, as well as when we are about to return from main. This should help to understand when a similar atexit shutdown pause is coming into play in the future.
KumoMTA
KumoMTA is an open-source Message Transfer Agent (MTA) designed for high-performance outbound email functionality, similar to commercial enterprise MTAs such as Momentum, PowerMTA, and Halon.
The KumoMTA project was founded by a group of email industry veterans with decades of experience building and managing high-performance On-Prem MTAs and is supported by a community of some of the largest senders in the world.
Because it is designed for high-performance sending environments, KumoMTA is for experienced email operations professionals who are accustomed to high-performance sending environments and familiar with DevOps practices.
Learn more in our FAQ and at https://kumomta.com/.
Documentation
You can learn more about KumoMTA from the Documentation.
Community
Real-time discussion is available on Our Discord.
Developers
If you are interested in contributing/extending KumoMTA, take a look at DEVELOPERS.md. The #devel channel on Our Discord is for contributors to discuss KumoMTA development.
Reporting Bugs
See How to Report Bugs.
Getting Help
See How to Get Help. For paid support see https://kumomta.com/support.
Getting Updates
You can subscribe to updates at https://kumomta.com/subscribe, we send updates periodically and will never sell nor share your information.
Talk to Us
We're available to talk about the project, book us at https://cal.com/team/kumomta/talk-with-kumomta.