Strange Issue With my server Plz Help

Discussion in 'Site & Server Administration' started by Pathan, Jul 3, 2010.

  1. #1
    Hello,

    I am running dedicated server, well there is strange problem happening from the last couple of months, As I am using monitoring services from couple of websites so what I noticed is that after few days or every day I am getting emails from monitoring websites regarding the Connection Time Out Error, I myself verified it as when I receive the email I checked by opening website its keep on loading, I contacted softlayer support they increase the ServerLimit to 1000 and they also increased the MaxClients to 1000 in apache conf file.

    Please let me know what is the cause of this issue.

    Here is my httpd.conf file configuration

    RLimitMEM 473479850
    RLimitCPU 240
    KeepAlive On
    ServerLimit 1000
    MaxKeepAliveRequests 100
    KeepAliveTimeout Off
    UseCanonicalName Off
    AccessFileName .htaccess D
    efaultType text/plain

    and

    <IfModule prefork.c>
    MinSpareServers 5
    MaxSpareServers 10
    StartServers 5
    MaxClients 1000
    MaxRequestsPerChild 10000
    </IfModule>

    My server configuration is as follows.

    Intel Xeon 2.4 GHZ Quad Core
    4GB Ram,
    server load average under 1%
    memory usage is always under 30%
    Hard Disk usage is less then 20%

    Please suggest.

    -Regards.
     
    Pathan, Jul 3, 2010 IP
  2. muhabbatain

    muhabbatain Active Member

    Messages:
    195
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    Change these settings
    MaxSpareServers 20
    StartServers 10
    MaxRequestsPerChild 5000
    also define the time of keep alive request (3-5secs). your server can support MaxClients upto 2000.

    If you have a busy site and you think you can spare $30/month then use Litespeed server. It is 3times faster than apache.
     
    muhabbatain, Jul 5, 2010 IP
  3. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #3
    You might want to try this configuration here, you said your server has 4GB of RAM. This is a fairly standard configuration for 2G-8G

    KeepAlive On
    MaxKeepAliveRequests 150
    KeepAliveTimeout 5
    <IfModule prefork.c>
    StartServers 20
    MinSpareServers 20
    MaxSpareServers 40
    ServerLimit 350
    MaxClients 350
    MaxRequestsPerChild 1000
    </IfModule>
    <IfModule worker.c>
    ServerLimit 14
    StartServers 4
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 25
    MaxClients 350
    MaxRequestsPerChild 1000
    </IfModule>
    Timeout 300

    Also, if you look at your stats, what's the most highly requested URL? If it's an image or document, you may be able to setup caching with mod_expires or mod_headers.
     
    zacharooni, Jul 6, 2010 IP