Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is happening to apache? I cannot trace down the processes doing this to my server. I can't anymore, the server is crashing every day a few times. Don't know what to do anymore, tried all the answers here, i can't find the problem.

apache    5978  0.0  1.4  34060 14000 ?        S    10:13   0:00 /usr/sbin/httpd
apache    5979  1.8  3.6  61660 35632 ?        S    10:13   0:02 /usr/sbin/httpd
apache    5982  1.9  3.6  61712 35640 ?        S    10:13   0:02 /usr/sbin/httpd
apache    5983  0.0  1.7  46000 17480 ?        S    10:13   0:00 /usr/sbin/httpd
apache    5984  1.4  4.3  70880 42644 ?        S    10:13   0:02 /usr/sbin/httpd
apache    5985  2.6  4.3  69864 42888 ?        S    10:13   0:04 /usr/sbin/httpd
apache    5986  0.7  3.9  67240 39220 ?        S    10:13   0:01 /usr/sbin/httpd
apache    5987  0.8  3.9  67240 39228 ?        S    10:13   0:01 /usr/sbin/httpd
apache    5988  2.5  4.3  70136 43160 ?        S    10:13   0:03 /usr/sbin/httpd
apache    6151  0.0  1.7  45868 17404 ?        S    10:15   0:00 /usr/sbin/httpd
share|improve this question
    
Any relevant apache or system logs? –  Khaled Nov 29 '11 at 10:08

2 Answers 2

From the information you have given, your memory usage does not seem particularly high.

I am running a test vm with 512MB memory on debian with php (among other modules) and the output is:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
www-data  3213  0.0  1.0 151384  5500 ?        S    09:47   0:00 /usr/sbin/apache2 -k start
www-data 28653  0.0  1.0 151392  5524 ?        S    Nov27   0:00 /usr/sbin/apache2 -k start
www-data 28654  0.0  1.0 151144  5408 ?        S    Nov27   0:00 /usr/sbin/apache2 -k start
www-data 28716  0.0  1.0 151392  5524 ?        S    Nov27   0:00 /usr/sbin/apache2 -k start

I would not necessarily attribute your crashes to high memory usage unless you are running in a restricted environment (check ulimit) or virtual environment with low memory (check cat /proc/meminfo).

Assuming it is apache crashing I would suggest checking the error_log and access_log near the time of your crash to better isolate the issue.

Otherwise more detail (most probably in a new question) would be better (what is crashing, the whole machine or just apache; what is running on the machine; what are the machine specs; what is the distro etc.)

share|improve this answer

Apache httpd spawns new processes and/or threads as required by the workload, within limits you set in your configuration.

If these limits are set too high, or your processing backend consumes too many resources, this may inhibit the ability of the apache machine to process network requests.

In general, PHP or CGI consume much more memory than apache itself does; consider offloading the dynamic parts to a proxied backend with a fixed (smaller) number of processing threads.

This backend can run on the same machine as the frontend web server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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