Solved

Apache suddenly reaching max connections

Posted on 2012-04-12
5
534 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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
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.

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now