Solved

Apache suddenly reaching max connections

Posted on 2012-04-12
5
550 Views
Last Modified: 2012-06-12
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
</IfModule>

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?
0
Comment
Question by:musickmann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 78

Expert Comment

by:arnold
ID: 37840392
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.
0
 
LVL 2

Author Comment

by:musickmann
ID: 37842265
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?
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 37843173
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.
0
 
LVL 2

Author Comment

by:musickmann
ID: 37900544
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.
0
 
LVL 2

Author Closing Comment

by:musickmann
ID: 38074502
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.
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question