For the past few weeks, our businesses mail server has been intermittently freezing. I've ready through multiple fixes and applied some of them, but I am lost and must ask for help.

Our mail server runs our staff email, (RoundCube and Squirrelmail) and a WordPress install for our Intranet. We are running Ubuntu 10.04, Sendmail, Dovecot, Apache2 and PHP 5.3.2. I have updated all installs to the latest versions that are supported by Ubuntu.

At different times throughout the day, our system CPU use will jump to 100% (of both processors) while monitoring them using HTOP. The output of HTOP always lists these entries as the offending processes, with higher CPU use, of course:

5892 www-data 20 0 64404 25092 6816 S 0.0 0.6 0:01.71 /usr/sbin/apache2 -k start

I am also monitoring Apache using the mod_status module.

I have attached a screenshot of my Server Status page during one of the freezes. The /email entries are RoundCube and the /intranet entries are Wordpress.

enter image description here

I was hoping someone who has more knowledge of Linux/Apache would be willing to help me out.

  • After reading another article, it turns out it may be an issue with Apache caused by Wordpress. If I hold down F5 and refresh the page, Apache locks up the server entirely. I'm still investigating, but at least I'm on the right track finally... – user671460 May 8 '14 at 18:41

Looks like the user with uid 976 has a giant email in his sent folder, I suspect his client is repeatedly trying to preview it and bogging down the server. This can happen when it takes longer than a timeout to process the mail.

Have you tried switching to another php worker such as FPM? Last I checked PHP was single threaded execution.

  • Thank you. We had a user with 8000 emails in their sent folder! – user671460 May 9 '14 at 13:52
  • Also, I have tried installing MPM_Worker instead of prefork, but have never been able to get it working. When we rebuild our mail server in a few months, I will either use worker, FPM or a different web server altogether. – user671460 May 9 '14 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.