?
Solved

Apache suddenly reaching max connections

Posted on 2012-04-12
5
Medium Priority
?
562 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 79

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 79

Accepted Solution

by:
arnold earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

770 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