Apache - max clients reached issue

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Apache - max clients reached issue
# 1  
Old 11-12-2010
Apache - max clients reached issue

Hi,
I have a web application (using apache) and for the past 2 months I am getting the below error in my production environment. I want to re-produce the same issue in my non-production environment, could you please let me what all are the parameters I have to modify in order to do that. Also I don't want to open too many sessions for this, please help me in re-producing this issue by opening minimal sessions.

Error :- [error] server reached MaxClients setting, consider raising the MaxClients setting

Below are my apache settings:
Quote:
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 3
MaxSpareServers 6
StartServers 4
MaxClients 32
MaxRequestsPerChild 200
I have read multiple blogs to understand this, but could not able to understand the settings,so please help me on this. Thanks.

Last edited by senor.ram; 11-12-2010 at 11:13 AM..
# 2  
Old 11-12-2010
32 MaxClients can be relatively low, but before raising it you need to look at what your current MaxServers setting is. MaxClients cannot exceed MaxServers (MaxServers sets the hard limit).

Please post your MaxServers parameter from your apache2.conf file.

Edit: Corrected mistakes in this post below ... Neo
# 3  
Old 11-12-2010
Quote:
Originally Posted by Neo
32 MaxClients can be relatively low, but before raising it you need to look at what your current MaxServers setting is. MaxClients cannot exceed MaxServers (MaxServers sets the hard limit).
How is MaxServers different from MaxSpareServers?

I'm not trying o hijack the thread, I'm just being curious as I don't see any "MaxServers" option in one of my httpd.conf files.
This User Gave Thanks to verdepollo For This Post:
# 4  
Old 11-12-2010
Hey, you are right for correcting me, thanks. Smilie

MaxServers was depreciated a number of years ago and replaced with MaxSpareServers, as I recall.

MaxClient is the overall process (hard) limit, not the other way around as I mistakenly posted above.

Sorry about that.... Smilie

---------- Post updated at 16:33 ---------- Previous update was at 16:31 ----------

FWIW, here is an example from one of our Apache servers:

Code:
<IfModule mpm_prefork_module>
    StartServers         64
    MinSpareServers      64
    MaxSpareServers      128
    #MaxClients           256
    MaxClients           272
    MaxRequestsPerChild  0
</IfModule>

# 5  
Old 11-14-2010
Hi,
Could you please tell me how I have to test my scenario.

Thanks.
# 6  
Old 11-15-2010
You can simulate the error message in your lab by reducing the MaxClients from 32 to 2 as an example and restart the webserver. From their, open 3 browser connections to the webserver. The first 2 will success and the 3 will timeout. Take a look at the error log and you should see the corresponding message.

Mike
# 7  
Old 11-15-2010
I have changed the setting in conf and tried to simulate the issue. But its not working.

Here are the steps I did:

1. modified the conf
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 3
MaxSpareServers 6
StartServers 4
MaxClients 2
MaxRequestsPerChild 200

2. restarted the webservices
3. Opened the application more than 4 sessions in different browsers from my system.
4. But issue didn't occurSmilie

Please check this and let me know if I did any mistake here.

Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Apache Virtual host issue

Hello, I am facing a very strange issue while setting a virtual host on apache to setup multiple websites using separate IPs. Virtual host is setup but when i am browsing the website it display content under /var/www/html and displaying site1 and site2 folder instead of access the content... (2 Replies)
Discussion started by: sunnysthakur
2 Replies

2. Red Hat

Apache 2.2.17 compile issue.

Hi, I am using RedHat Linux 5.3 64bit OS.. When i try to compile apache 2.2.17. during the make install i am getting the below error. Appreciate your help. rsync: link_stat "/Application/softwares/softwares/httpd-2.2.15/docs/manual/." failed: Permission denied (13) rsync: cannot stat... (4 Replies)
Discussion started by: Krrishv
4 Replies

3. AIX

Apache Installation issue

HI Guys, I got the below error while trying to install the apache2.2.15. from the error I can interpret that some of the .h files are missing. I guess those are C library header files.. Can you help me with it. bash-3.00# make Making all in srclib Making all in apr /bin/sh... (3 Replies)
Discussion started by: kkeng808
3 Replies

4. UNIX for Advanced & Expert Users

AT can't be created for you. Max size of the queue is reached..

I have a listener (a batch job written in shell script) that calls a perl file (say apple.pl). The listener runs at scheduled timing (say 11 pm to 6 am)&. Owner of the listener is a common id. My question is.. Once the listener starts running (here, Im NOT attempting to generate any reports... (1 Reply)
Discussion started by: vavjeeva
1 Replies

5. Web Development

Apache 2.0 Issue

I did not see a DocumentRoot entry in apache2.conf so I manually put one. DocumentRoot /mohit I restarted apache services but the the pages do not serve from that location. Can someone tell me what I need to do? (4 Replies)
Discussion started by: mojoman
4 Replies

6. UNIX for Advanced & Expert Users

Apache issue

I am trying to get a number of virtual server running on a linux/apache box. I have the virtual server configure properly. However doesn't matter what happens it allways ends up in the / directory (root for apache) and brings up the default page. If I look at the log files all i ever see is GET /,... (1 Reply)
Discussion started by: frankkahle
1 Replies

7. Solaris

Apache start issue

Hi group, I need help to start apache in following scenario: 1) Say apache is installed on solaris OS by user 'root'. 2) An entry is there in httpd.conf that says to start apache process as user: #User <RUN_AS_USER> is edited as User user1 2) Now say user2 has logged and tries to start... (6 Replies)
Discussion started by: rs266
6 Replies

8. Solaris

Apache config issue

I want to build a little website on a Sun Blade 100 running Solaris 10. I just went out to apache.org and downloaded Unix Source: httpd-2.2.8.tar.gz After unpacking the tarball, I CD'd into the subdirectory and ran the configure utility. Of course, it crapped out. I see that it is... (17 Replies)
Discussion started by: BrewDudeBob
17 Replies

9. Solaris

Max LUN reached ? (Securepath)

Hi all, I can not present a new Lun with my EVA 5000 storage and Securepath ... I have already 16 Lun's presented to the same server (Solaris 8), but can not add the 17th :-( Do you know if we have a limitation with Solaris or Securepath ? (Config file to update, software limits ...) ... (3 Replies)
Discussion started by: unclefab
3 Replies

10. Solaris

Apache Configuration issue on Solaris

I seem to have an issue with Apache configurationon our Sun solaris Server. Since there are 2 my_app instances running in parallel, the perl modules in my_app_perl_libs are getting shared between them, even though they are in different directories (/u01/my_app and /u01/my_app8). This is because... (1 Reply)
Discussion started by: rahulrathod
1 Replies
Login or Register to Ask a Question