Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    350

    Apache, where to see number of connections?


    Hello,

    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 03:07 PM.

  2. #2
    Just Joined!
    Join Date
    Sep 2013
    Location
    Hyderabad
    Posts
    29
    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 127.0.0.1 ::1 66.77.88.99

    Restart Apache: sudo service apache2 restart

  3. #3
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    350
    mod_status
    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
    </Location>

    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
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2012
    Posts
    13
    You can also check the number of connections by executing the following command:
    Code:
    netstat -n | grep :80 | wc -l

  6. #5
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    350
    Quote Originally Posted by rosehosting View Post
    You can also check the number of connections by executing the following command:
    Code:
    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
    Just Joined!
    Join Date
    Oct 2013
    Location
    India
    Posts
    5
    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
    </IfModule>

Posting Permissions

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