• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 583
  • Last Modified:

Apache suddenly reaching max connections

I have an apache server serving one website, Moodle. Just today it started reaching MAxCLients according to the error log

[Thu Apr 12 14:52:27 2012] server reached MaxClients setting, consider raising the MaxClients setting

This happened at 1:15 as well, restarted the server, and then just happened again.

The conf file lists MaxCleints at 256

# 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
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000

I'm not sure why this is suddenly happening with no change in use or audience. Is just raising the MaxClients an option? Is there somewhere that shows how many connections were being made and where they were coming from within apache, or is that something I would need some other software for?
  • 3
  • 2
1 Solution
Check to make sure you are not under a DDoS attack.
Not sure why you're setting the requestser client so high. Reduce the requests to force the client to reconnect.
musickmannData AnalystAuthor Commented:
This is a server that I inherited from other people who set it up. So I don't have an answer for why the numbers are set where they are. And I'm not really a very experienced linux/apache person, so I'm learning as I go.

This is a Moodle server behind an ISA used for internal traffic only, so I don't think a DDos attack would be happening. There are about 9500 users in the system, but at any given time, I would estimate that there could be as many as 1200 actively using the system at the same time.

Not knowing specifically how to choose the best settings, I'm not sure what the numbers in the conf file should be.

Im trying to get information from the client about network traffic to see if they can identify an unusual spike yesterday that caused the error.

But also, if this issue persists, is there a way to do an automatic restart of the apache service to reset the MaxClients?
Raise the maxserver and maxclients to 320 while reducing the number request per client to 300
See whether the load on the server increases versus getting those maxclients reached error.
musickmannData AnalystAuthor Commented:
We had a crazy failure that I've been dealing with, I still need to try this solution out, so I apologize for the delay. I don't want to make this change until we figure out what went wrong apart from this.
musickmannData AnalystAuthor Commented:
Maybe it was just a freak thing, hasn't happened since but thanks for the help in trying to narrow it down. If I can't replicate the issue it's hard to know if anything is wrong.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now