Debugging Apache Lockups

I'm running Apache 2.0 on Ubuntu and I'm getting frequent lockups on port 80. Websites do not respond, the browser does not receive an http error code, it just continuously tries to load. I can "/etc/init.d/apache2 restart" to fix the problem but it returns shortly. I am a noob on Linux and don't know how to begin debugging the problem.

I ran a netstat during one of the outages and didn't see a large number of ports in use, so it's likely not getting attacked.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Have you checked your apache logs?
elmoredanielAuthor Commented:
Ok, error.log is showing
"[error] server reached MaxClients setting, consider raising the MaxClients setting"

So how do I adjust that setting.
elmoredanielAuthor Commented:
I have this in apache2.conf but I don't know what prefork.c and worker.c represent.

# prefork MPM
# StartServers ......... number of server processes to start
# MinSpareServers ...... minimum number of server processes which are kept spare
# MaxSpareServers ...... maximum number of server processes which are kept spare
# MaxClients ........... maximum number of server processes allowed to start
# MaxRequestsPerChild .. maximum number of requests a server process serves
<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients          20
MaxRequestsPerChild  0

# pthread MPM
# StartServers ......... initial  number of server processes to start
# MaxClients ........... maximum  number of server processes allowed to start
# MinSpareThreads ...... minimum  number of worker threads which are kept spare
# MaxSpareThreads ...... maximum  number of worker threads which are kept spare
# ThreadsPerChild ...... constant number of worker threads in each server process
# MaxRequestsPerChild .. maximum  number of requests a server process serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Here is more info on those apache modules:

Is that your whole Apache config file?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
elmoredanielAuthor Commented:
I saw those articles, but I don't have the background to know how best to set their values. I hope someone here does.

No thats just the part with the MaxClients setting.
You can also set the maxclients directive outside of these module configs.  

Just add MaxClients=256 somewhere in the apache2.conf file

and here is some more reading that I found interesting and useful in the past:

and also a more clear explanation of the directive:

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.