top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Number of concurrent connections to apache

+2 votes
554 views

The below setting is configured in one of our apache webserver

  ServerLimit          600  
  StartServers         5  
  MinSpareServers      5   
  MaxSpareServers      15  
  MaxClients           600

There are 2 virtual servers are hosted on this instance. So as per my understanding this max connections at any point of time to this apache will be 600 and this will be shared by both virtual webserver?

How could I know that how many current connections are open or how many unique requests this apache instance is handling? I know through server-status we can achieve this kind of info but sadly that option is not enabled.

Is there any other way, like through some command if I can achieve this? I googled for this answer but nothing specific I could find.

posted Dec 6, 2013 by Sheetal Chauhan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

You can use netstat command to see the current concurrent connections to server.http://linuxers.org/howto/how-find-out-active-connections-or-which-ports-are-openlistening-linux

answer Dec 6, 2013 by Seema Siddique
I used below command to get the number of established sessions on the server.
netstat -an|grep x.x.x.x:80|grep ESTABLISHED

To my surprise, it gave me total number as 728. 128 connections more what I have set up in my Apache. In apache I have set up max clients as 600. I want to know what is this extra 128 connections? How it is possible when Apache is configured to spawn only 600 child?
Similar Questions
0 votes

I am using Apache 2.2 on LE for several years now and I use intensively the virtual host mechanism (300 virtual hosts per http instance).

As soon as you start sharing resources between applications, you want to protect your platform and prevent an application from taking all the threads and cause a resource starvation for the others.

To do so i used the third party mod_qos module to limit the number of simultaneous connections per virtual hosts. Now that i intend to migrate to Apache 2.4, my first tests reveal that this module is not compatible with this version of Apache, thats also the warning that developer raised for his module.

It appears that I don't find any real alternative to substitute the mod_qos module with something else. Here are my questions :
- Can you confirm that Apache does not provide any mechanism allowing to limit the number of connection per virtual host, just to be sure that I am not missing something ?
- Why Apache doesn't provide such a functionality ? :) From my very humble user perspective, I am surprised that this is not a native functionality as it seems to me that my need is probably shared by many users. Moreover Apache provides many other complex functionalities, the one I am describing would be probably something simple to implement compared to other functionalities already available.

+3 votes

I have a requirement where the tomcat load has to be managed by tuning the following parameters.

--> Limit the number of user requests at Apache level that are routed to Tomcat server.
--> Track the number of processed requests and the requests that are queued at Apache level.

Any suggestions?

...