On Wed, 8 Feb 2006, Vernon A. Fort wrote:
I have posted a few messages to several groups lately concerning crashing
with "out of memory" errors. The system would run for several days and then
just crash. I think I found the problem and it wasn't lmtpd or bitdefender
or postfix or the number of concurrent messages.. It was the saslauthd not
releasing its swap usage.
Saslauthd's memory usage would continue to grow (watching top with a
shift+m). Once I restarted the daemon, the total swap usage would shrink to
36k from 2GIG. I added the FLAGS (-c -s 128 -t 30) to the init script. The
setup:
postfix + amavisd-new + clamav + cyrus-sasl + cyrus-imapd + mysql
Cyrus-imap is configured to use saslauthd - saslauthd is configured to use
pam and pam/imap is using the pam_mysql.
Again, the system would run fine for a few days and then crash. I discovered
this by watching vmstat+top+iostat and noticed when 200+ messages came in at
once, the system hardly swapped at all BUT the swap USED still increased. I
watched the swap used grow to 3 GIG within 36 hours.
Adding the -c FLAG (credential caching) 'appears' to have solved the problem.
Anyway - just posting a follow up in the event someone else has a similar
problem.
We had the same problem a long time ago with saslauthd. Apparently some
of the pam libraries leak memory and saslauthd grows big fairly fast. Our
solution was to add "-n 0" to the command line so that saslauthd forks off
a new process for every auth request. It's a bit cpu intensive but works
well.
I've never tried the -c caching option. If it is really the pam libraries
leaking memory, then eventually you'll still run out of memory. :/
Andy
----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html