Vitalie Lazu old blog

Another blog about ruby, rails, debian and system administration. Other useful staff for developers and system administrators.

Monday, November 05, 2007

Apache process hangs in memory with mode operation L.

I have a heavy loaded website with 12req/second and I use apache 2.2.6 with mpm_event_module, because threaded and prefork modules suck already. Apache server with 5 mongrels in cluster: 3 on the same server and 2 remote. MYSQL is also remote. Memcached runs on the same server. NFSD also running. Below is apache tuning for mpm_event module:

StartServers 1
MaxClients 150

MinSpareThreads 15
MaxSpareThreads 25
ThreadsPerChild 25
MaxRequestsPerChild 0
It works great, with some exceptions: some apache processes hangs in memory with mode operation L (logging request to disk)
Mod status says that pid 31159 hangs for 1278 seconds (20 minutes) and it wastes system resources, making website to load slower. I had to kill hanging processes manually for some time, but in last weekend I wrote a simple ruby script that use hpricot gem to parse mod status and detect hanging processes wit h status L, then it kill them. I put it in a cron job to run every 10 minutes and i forget about the problems.

Labels: , , ,

0 Comments:

Post a Comment

<< Home