Solved

Apache suddenly reaching max connections

Posted on 2012-04-12
5
543 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
  • 3
  • 2
5 Comments
 
LVL 77

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 77

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

830 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