at some point apache seems to hang up and not serve requests anymore or they take forever. i checked the error log. doesnt show any errors when i do apachctl stop and start apache again it works again
WHAT DO YOUR ERROR LOGS SAY?
Chances are your httpd.conf file needs to be tuned. That being said let's get started.
Virtually almost always httpd.conf is located @ the same place - I am hoping you are comfortable with shell as well as the editor of your choice... I will use NANO in this explanation..
First complete this command:
Next use the following command to open the original httpd.conf file in your editor:
Then use "Control-W" to open the search command and type Timeout - you should see something similar to this
Change that to
Press the Control-X key and then save the file overwriting the original
Finally - restart Apache using:
Following the aformentioned directions - you can also edit a few other settings:
Be Sure to only do one change at a time to make sure each works... slow is better than major changes and major crashes
Search for the following section: prefork MPM (or just prefork )
and change to something one of the following - based upon the level of your server:
basic level servers (small resources):
Medium level servers (medium resources):
Larger level servers (larger resources):
Anyhow - these should be a decent start - of course you will want to continue to fine tune to get the best solution.
Happy Editing :-)
did this help you? be sure to vote on this answer
Apache can crash for a number of reasons. The possibilites include
Your question is pretty vague, so I'd start by taking a look at your httpd.conf and, if you're using a modular compilation, try preventing modules you don't need from loading. The lines look like this:
Next, take a look at which version you're running. If it's a PHP app, tune script memory usage to something attainable. Also take a look at how many clients you've configured to allow to serve at any one moment.
Let's get real: the list could be a mile long, and is far beyond my ability to explain at this given moment in time. I highly recommend the Apache Performance Tuning documentation, which goes into better detail and comes from, well, a rebutable source.
I've personally experienced many server problems over the years -- they happen. Automate how you respond to them. Give the computer a chance to handle events before you need to get involved. I highly recommend Monit as a robust and capable tool, without the headache of Nagios configuration. Monit configuration uses clear, concise syntax.
Best of luck.
Check for number of request it can handle concurrently. look in HTTPD.CONF file .
There can be many reasons for Apache hanging. Not enough connections is just one potential cause, so don't assume anything. The first things I check if Apache is acting weird: