Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Apache, where to see number of connections?


    i want to get an idea how many connections is need to load my PHP, Mysql website so i can properly set firewall max connections --> ban.

    Please how can i discover/see this number? From linux command line?
    Last edited by postcd; 10-03-2013 at 02:07 PM.

  2. #2
    Just Joined!
    Join Date
    Sep 2013
    try mod_status

    Webmin - a basic overview of the steps.

    In Webmin it is represented as a web page. It shows the current state directly queried from Apache

    Enable mod_status: sudo a2enmod status
    Grant yourself access. Open /etc/apache2/mods-enabled/status.conf and edit:
    Set ExtendedStatus to On (optional, but more awesomeness and a little slower)

    Within the <Location /server-status>, append your IP address to the line with the Allow directive. Example:

    Allow from ::1

    Restart Apache: sudo service apache2 restart

  3. #3
    rajesh: thx, my directory is /etc/httpd/modules/ ; /etc/httpd.conf:
    It worked, only when i entered my IP address of my computer, how to make it work without entering access IP and still being secure? This worked:
    <Location /server-statusCUSTOMPHRASSEHERE>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from all

    I see:
    1.2 requests/sec - 819 B/second - 682 B/request
    6 requests currently being processed, 27 idle workers

    How i can spot one user requests from this, also any other simple way to determine it?

  4. $spacer_open
  5. #4
    Just Joined! rosehosting's Avatar
    Join Date
    Oct 2012
    Missouri, USA
    You can also check the number of connections by executing the following command:
    netstat -n | grep :80 | wc -l

  6. #5
    Quote Originally Posted by rosehosting View Post
    You can also check the number of connections by executing the following command:
    netstat -n | grep :80 | wc -l
    It shown 80, but i asked about connection of one user, im hosting more sites on this server. So this is not answer on my initial question i assume..

  7. #6
    You can set number of connection from httpd.conf file. Apache has MPM modules to manage clients and Apache requests per child. IT is part of performance tuning and it is very useful in heavy traffic site.

    <IfModule prefork.c>
    StartServers 8
    MinSpareServers 5
    MaxSpareServers 20
    ServerLimit 256
    MaxClients 256
    MaxRequestsPerChild 4000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts