Forum Moderators: phranque

Message Too Old, No Replies

Apache hitting maxclient - require Assistance for solution

         

IamRasheed

3:11 am on Feb 26, 2015 (gmt 0)

10+ Year Member



Hello,

I need assistance in understanding one issue we faced in our environment.
We have an application which has apache, Jboss and DB.
It was running fine but suddenly one day users got accessibility issue.
i checked the child process count and found the count is 65 while we set the maxclient as 64. 64 is more enough as our application will always have less than 40 almost all the time. This issue happens only two times in the last 3 year.
We understood number of parallel connection hitting the apache that is why it reached maxclient. I also confirmed it by seeing the error log with maxcleint reached error.
I restarted the apache. At the time of restarting the apache the process count reduced to normal but in seconds it reached again the max. For testing purpose i increased the maxclient from 64 to 75 and restarted. This time again the count reached 76 and then application not accessible with in seconds. We restarted for several times and after 2 or 3 hours in multiple restart of around 4 times it went normal.

Below is my concern. Could some one please help me in clarifying it.
1.) After we restart also maxclient reached again. If we restart all the connections should reset but in our case after reset also process cont increased and hit the max in seconds. Is that means Many connections are already in queue once we restarted the apache the current 64 concurrent connections only closed but it was filled again by the connections in the queue as soon we restarted ?

2.) Restart will not fix the issue when such a issue occurred , we have to stop and wait for sometime like 5 minutes and give time for all the connections to be closed and then start the apache or what else step we can do if this issue happens again? We can increase the maxclient so that this issue wont happen at all but as i said earlier we are not sure how much concurrent connections occurred at that time to find the new maxclient value as well as the concurrent connections will be always less than 40 through the year except this rare case. So i want the fix for this issue other than increasing the maxclient value.

Kindly please help me in resolving this issue if it occurred.

IamRasheed

7:10 am on Mar 2, 2015 (gmt 0)

10+ Year Member



Hi,

Can anyone help me on this. It would be be more helpful for me.
Thanks.

lucy24

7:24 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can anyone help me on this.

Well, sure, but not necessarily within the first three hours and fifty-nine minutes after a (by US time zones) Sunday-evening posting.

IamRasheed

7:30 am on Mar 2, 2015 (gmt 0)

10+ Year Member



Hi,

Ok fine. I'll wait
I actually posted on Feb 26th. So i thought someone will help me.
No problem.I'll wait.

phranque

8:43 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



do you have a ListenBacklog or ServerLimit directive specified in your configuration?

which MPM are you using?
Multi-Processing Modules (MPMs) - Apache HTTP Server Version 2.2:
http://httpd.apache.org/docs/2.2/mpm.html [httpd.apache.org]

IamRasheed

9:33 am on Mar 2, 2015 (gmt 0)

10+ Year Member



Hello,
Thank you for the reply.

Below are the details

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
StartServers 4
MinSpareServers 4
MaxSpareServers 16
MaxClients 64
MaxRequestsPerChild 0


I checked using httpd -V , Our server is using prefork.

bhukkel

10:22 am on Mar 2, 2015 (gmt 0)

10+ Year Member



Depending on your load you could lower the keepalivetime. If you have a lot of single pageviews i would lower it to the default value of 5.

What do you see in the access log if you turn apache on again?

lucy24

4:54 pm on Mar 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I actually posted on Feb 26th.

Oops, my bad. The time was so striking, I overlooked the date. (In retrospect, the question did seem awfully similar to one posted several days ago which everyone put in their "I'll deal with it later" bin :))