SaslAuth + Mysql (SOLVED)
morgan at orst.edu
Wed Feb 8 18:01:53 EST 2006
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
> 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
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
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. :/
More information about the Info-cyrus