Fixing qmail-smtpd spawning many processes, using full cpu
Submitted by robot_terror on Wed, 12/12/2007 - 05:17.
Source: http://forum.swsoft.com/printthread.php?threadid=40173
If qmail-smtpd is spawning many processes and comsumming all processing capacity on a server check the name of the *.pem files in /var/qmail/control. If the files are not:
dh512.pem dh1024.pem
Rename them (usually I've seen dhparam512.pem and dhparam1024.pem) accordingly, or, symlink them:
# cd /var/qmail/control # ln -s dhparam512.pem dh512.pem # ln -s dhparam1024.pem dh1024.pem # service xinetd restart # killall qmail-smtpd # <-- optional, but I do this to clear the orphans
From the SW-Soft forums, the explanation given for this event is:
These 2 certificate files are used by qmail-smtpd for TLS sessions. qmail tries to open them on each incoming connection, so if they are not available qmail has to generate them on-the-fly which occupies all cpu time.
I saw this twice last night and this information resolved the problem both times.
