Apache stops processing

Apache stops processing

by Renato Jr -
Number of replies: 3
Hello,

I'm using Apache 2.2 / PHP 5 / MySQL 5.0 in Windows Server 2003.

With 100 concurrent users, apache consumes about 1Gb RAM and stops processing. We have 4Gb RAM in server, and 2Gb are not being used.
Why does Apache stops? It should be using the 2Gb RAM which is not being used. How do I config it?

Thanks.
Renato
Average of ratings: Useful (1)
In reply to Renato Jr

Re: Apache stops processing

by Greg Lund-Chaix -
Are you sure it's a memory problem? Could you be processor-bound? I've noticed with my Moodle systems that generally high-concurrency load has been processor-bound not memory. Is the CPU utilization high?

Are you using eAccelerator or APC? What are your maxclients, etc. settings? Are you using worker or prefork?

-Greg
In reply to Greg Lund-Chaix

Re: Apache stops processing

by Renato Jr -
Greg,

CPU utilization is high (see in attachment). I thinks this is the problem. My processor is a Intel Xeon 3060 2.40Ghz.

I'm not using eAccelerator or APC.

My apache config:

StartServers 15
MinSpareServers 15
MaxSpareServers 30
MaxClients 250
ThreadsPerChild 100
MaxRequestsPerChild 0
SendBufferSize 50



Thank you.
Renato
Attachment server-moodle.jpg
In reply to Renato Jr

Re: Apache stops processing

by Greg Lund-Chaix -
I don't have any experience running Apache on Windows systems, but looking at the screen snap you posted strikes me as a little odd. It looks like Apache is not using both processors. Also, the processor Apache is using is not maxing out. The load is certainly present, but it's not pegged at 100%. So the system - at least in your screen snap - doe not appear to be totally processor-bound.

When you say "Apache stops" what, *exactly*, do you mean? Does the httpd process die and need to be restarted? Or does the site continue to serve existing connections, but refuse new ones? What does the user see - a hung or lagged connection or do they receive an error (like 503)?

I see a few things, regardless:

1) Load eAccelerator or APC. That will very likely immediately drop your CPU utilization, since the opcode cache takes the load of compiling the PHP code off the processor. Frankly, I don't see reason why not to enable an opcode cache on *any* Moodle server, regardless of scale. It's all benefits with no downside.

2) Your Apache process doesn't seem to be using the other processor when it's under load. It should be able to use more than one processor. This is likely a Windows-specific config issue. Are you running Apache in worker or prefork?

3) Is MySQL running on the same server as Apache? Is there anything in the MySQL slow query log? A slow database backend can cause the Apache threads to pile up and start timing out.
Average of ratings: Useful (2)