[TriLUG] FC2, Dovecot, Squirrelmail = Crash
Aaron S. Joyner
aaron at joyner.ws
Sun Jun 27 17:48:35 EDT 2004
Jason Tower wrote:
>i ran dovecot for a while on my rh9 server, and it would crash from time
>to time when i accessed my imap folders with kmail. ever since i
>switched to courier-imap (on mandrake) it has been flawless.
>
>however, i have a client whom i recently (well, eight months ago) set up
>with makdrake, courier, and squirrelmail. during the initial
>migration, one of the users had a couple of large mailboxes (thousands
>of messages) that would cause squirrelmail to return an out of memory
>error, even though they worked fine with a standard imap client. my
>guess is that squirrelmail is trying to sort all of the messages by
>name or date or whatever, and hitting a memory wall with apache or php.
>not being a web guru, that's the best diagnosis i could come up with,
>and it sounds like what your friend is experiencing too.
>
I found out some more details on this earlier today. It appears that
PHP runs out of memory when squirrelmail is trying to do a "show all" on
extremely large folders (on the order of 11,000 messages, for example).
When this happens, an error is logged in Apache, and then Apache becomes
utterly unresponsive. It won't load pages that don't depend on PHP,
etc. I can understand it not loading that page, but I can't understand
it completely toasting Apache. Apache is still running, there are still
active httpd processes, and they still respond on port 80. They can
return errors, but not real pages. I can telnet and request a page and
it disconnects me immediately. I can send an invalid request and get a
302 error back. Anyone know why PHP causing a memory fault would cause
this kind of havoc?
Also, here's another wrinkle in the mix. When we were testing, we
repeatedly crashed Apache in this way (mostly on purpose) and then were
doing a "service httpd restart" (essentially just a kill and restart).
Eventually, Apache couldn't restart itself, complaining of insufficient
space on the device, and referencing semaphores. Presumably, the box
had run out of semaphores because Apache and PHP's threading had been
screwed up in some way. A reboot fixed it. I don't think that really
provides any insight into the situation, but does anyone know of a way
to clear those semaphores?
Aaron S. Joyner
More information about the TriLUG
mailing list