Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a LAMP server with following configuration -

  • 32 Bit OS Debian Etch
  • Apache 2.2
  • PHP 5.2
  • MySQL 5.0.32


  • 3 GB memory
  • 2 Intel(R) Xeon(R) 1.86GHz CPUs

Each Apache process taking around 10mb mememory. Apache access log is disabled. Apache, MySQL and PHP is installed using apt-get.

Peak of numbers of hits per second of Apache is 415 hits / seconds

Need to know if its too much for the as my Apache needs a restart every half hour due to memory used up and swapping.

What can be possible wrong with it, please help ....

Adding Apache configuration :

Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild 100
<IfModule mpm_worker_module>
    StartServers          4
    MaxClients          600
    MinSpareThreads      50
    MaxSpareThreads      150
    ThreadsPerChild      25
    MaxRequestsPerChild  0
share|improve this question

closed as not a real question by Wesley, womble, MadHatter, Ward, Khaled May 7 '12 at 15:19

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

First of all, I suggest you upgrade to a more recent version of Debian. Security updates for etch have been discontinued since February 2010. – Oliver May 7 '12 at 5:26

ps/top sort of lie about memory usuage. You are seeing each process use 10megs of memory idle but apache loads a ton of shared libraries up and each process might be using 9meg of shared libraries. So your real usage might be the 9megs of shared libraries (assuming none are already loaded) + like 1-1.5meg for each process running.

But to answer your question.. how can we help tune anything if you don't show configs and what you are seeing as wrong.. Also memory/cpu is really taken up on run time of the application.. If your app is a memory hog.. nothing apache configs can do to fix that.

Here's what I'd do with knowing nothing about your system. Increase the number of clients it can accept. Make sure keepalive is off or if you need it on set the timeout very small.. 2-3 seconds.

share|improve this answer

At least post your phpinfo(). Or httpd.conf/php.ini. You can use jsfiddle to dump the phpinfo() (i recommend removing anything like domains or names of servers before you post it to the world) and pastebin for your httpd.conf / php.ini.

With the information given there is little we can do to try and help out. You can try and remove unused modules and reduce the amount of memory required for each instance of PHP inside the php.ini file as a first step.....

httpd.conf can usually be found in /etc/apache2/conf/httpd.conf

php.ini can usually be found in /etc/php/php5/php.ini

Or something similar to that, depending on how you compiled sources.

And if your having to restart your apache every half an hour to get things working again, there may be something wrong with the application your trying to run, it may be using to much memory, or you have to many shared lib's installed.

share|improve this answer
What your asking is akin to this: "Hey i got this sound recording of my car on my dumb phone, whats wrong with my car?". Its very hard to diagnose :) – Mattisdada May 7 '12 at 4:09
  1. Upgrade to Debian Squeeze. Etch has been unsupported for some time, and won't be getting security updates. Security updates which are particularly important if you're running PHP.
  2. Upgrade/replace the 32bit OS with a 64 bit OS if possible.
  3. Put in more RAM. RAM is cheap. (8-16GB is a more realistic number)
  4. Install APC Opcode Cache for PHP.
  5. Edit your question to show us your php.ini file. Seriously.
share|improve this answer

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