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?

[Webinar] Streamline your web hosting managementRegister Today

savoneConnect With a Mentor Commented:
Here is more info on those apache modules:

Is that your whole Apache config file?

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.
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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
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:

All Courses

From novice to tech pro — start learning today.