Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Config apache for high traffic

Discussion in 'Workarounds and Optimization' started by benash, Nov 4, 2016.

  1. benash

    benash Registered

    Joined:
    Nov 4, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    hello,

    I use Wordpress site on VPS with maxcdn and my apache (httpd) is falling few times a day when the site got more than 800 users active (according to google analytics).

    My Hosting guys dont know what to do so I am asking you guys, what should I do to optimize my apache and Mysql to get the best settings?

    httpd fail log:
    Code:
    The service “httpd” appears to be down.
    
    Server
    
    vps------.com
    
    Primary IP Address
    
    198.---.--.--
    
    Service Name
    
    httpd
    
    Service Status
    
    failed ⛔
    
    Notification
    
    The service “httpd” appears to be down.
    
    Service Check Method
    
    The system failed to connect to this service’s TCP/IP port.
    
    Reason
    
    Timeout while trying to connect to service: Died
    
    Number of Restart Attempts
    
    2
    
    Startup Log
    
    No startup log
    
    Log Messages
    
    [Fri Nov 04 05:07:26.918324 2016] [mpm_worker:notice] [pid 17100:tid 139943561709536] AH00292: Apache/2.4.23 (cPanel) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 configured -- resuming normal operations
    [Fri Nov 04 05:04:27.755411 2016] [mpm_worker:notice] [pid 17100:tid 139943561709536] AH00292: Apache/2.4.23 (cPanel) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 configured -- resuming normal operations
    
    Memory Information
    
    Used
    
    4.54 GB
    
    Available
    
    2.39 GB
    
    Installed
    
    3 GB
    
    Load Information
    
    1.22 1.50 2.09
    
    Uptime
    
    1 day, 2 hours, 42 minutes, and 41 seconds
    
    IOStat Information
    
    avg-cpu: %user %nice %system %iowait %steal %idle 5.65 0.01 0.68 0.02 0.00 93.64 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
    
    Top Processes
    
    PID
    
    Owner
    
    CPU %
    
    Memory %
    
    Command
    
    30080
    
    galis7
    
    21.23
    
    2.11
    
    /opt/cpanel/ea-php55/root/usr/bin/php-cgi
    
    30079
    
    galis7
    
    20.56
    
    2.06
    
    /opt/cpanel/ea-php55/root/usr/bin/php-cgi
    
    30088
    
    root
    
    8.48
    
    0.70
    
    /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/bin/leechprotect
    
    29769
    
    nobody
    
    5.97
    
    0.37
    
    /usr/sbin/httpd -k start
    
    28988
    
    nobody
    
    5.63
    
    0.42
    
    /usr/sbin/httpd -k start
    
    The chkservd process attempts to connect to “127.0.0.1:80” in order to validate that this service is functioning. If you blocked connections with iptables or the “Host Access Control” interface in WHM, this failure may be a false positive.
    
    To resolve this issue, either open the firewall to allow connections as the root user to “127.0.0.1:80” or disable checks for this service in WHM’s “Service Manager” interface with the “Configure Monitor Settings” link below.
    thanks alot!!
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    569
    Likes Received:
    40
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    First of all let me know your VPS configuration and how many sites you have hosted on that VPS ?

    Might be there are high load on your server and that is the main reason of this issues. If there is high load on your server then following post will be helpful for you

    Troubleshooting high server loads on Linux servers
     
  3. benash

    benash Registered

    Joined:
    Nov 4, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    Hi,

    i have 5 sites on the VPS but just one of them is active (4 of them got max 1-5 users a day) and this is the one i got problem with the high traffic.

    do you have any idea for configuration?
     
  4. benash

    benash Registered

    Joined:
    Nov 4, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    crashing again and again
    last error log:
    Code:
    httpd
    
    Service Status
    
    failed 
    
    Notification
    
    The service “httpd” appears to be down.
    
    Service Check Method
    
    The system failed to connect to this service’s TCP/IP port.
    
    Reason
    
    Timeout while trying to connect to service: Died
    
    Number of Restart Attempts
    
    5
    
    Startup Log
    
    No startup log
    
    Memory Information
    
    Used
    
    4.63 GB
    
    Available
    
    2.54 GB
    
    Installed
    
    3 GB
    
    Load Information
    
    3.39 2.09 1.87
    
    Uptime
    
    1 day, 5 hours, 34 minutes, and 58 seconds
    
    IOStat Information
    
    avg-cpu: %user %nice %system %iowait %steal %idle 5.37 0.01 0.66 0.02 0.00 93.94 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
    
    Top Processes
    
    PID
    
    Owner
    
    CPU %
    
    Memory %
    
    Command
    
    32396
    
    root
    
    8.74
    
    0.70
    
    /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/bin/leechprotect
    
    32324
    
    nobody
    
    6.28
    
    0.27
    
    /usr/sbin/httpd -k start
    
    31974
    
    nobody
    
    6.16
    
    0.29
    
    /usr/sbin/httpd -k start
    
    31903
    
    nobody
    
    5.54
    
    0.29
    
    /usr/sbin/httpd -k start
    
    32283
    
    nobody
    
    5.05
    
    0.27
    
    /usr/sbin/httpd -k start
    
    The chkservd process attempts to connect to “127.0.0.1:80” in order to validate that this service is functioning. If you blocked connections with iptables or the “Host Access Control” interface in WHM, this failure may be a false positive.
    
    To resolve this issue, either open the firewall to allow connections as the root user to “127.0.0.1:80” or disable checks for this service in WHM’s “Service Manager” interface with the “Configure Monitor Settings” link below.
     
    #4 benash, Nov 4, 2016
    Last edited by a moderator: Nov 12, 2016
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Do you notice any additional error messages in /usr/local/apache/logs/error_log at the times Apache fails?

    Thank you.
     
  6. danielpmc

    danielpmc Well-Known Member

    Joined:
    Nov 3, 2016
    Messages:
    64
    Likes Received:
    28
    Trophy Points:
    18
    Location:
    Gainesville, Florida
    cPanel Access Level:
    Reseller Owner
    Hello benash,

    Do you have WHM/Configserver Firewall installed? If yes you can look through the following logs to see if you can find any issues. Take a look for any unusually large blocks of activity from individual IPs within these logs. Analyze what that IP is doing and the frequency of its activity. If its hitting a same page over and over it could be a hacker or someone trying to DDOS or DOS your domain. Or maybe a broken page on your site could be creating a loop in your system. If it is only hitting your Registration or Login pages then you may consider banning the IP. Somehow somebody is creating a bottleneck in your system and one or more of the logs listed below should offer you some insight.

    whm/configserver explorer/usr/local/apache/logs/access_logs

    whm/configserver explorer/usr/local/apache/logs/error_logs

    whm/configserver explorer/var/log/exim_mainlog

    whm/configserver explorer/var/log/exim_paniclog

    whm/configserver explorer/var/log/exim_rejectlog

    whm/configserver explorer/var/log/lfd.log

    whm/configserver explorer/var/log/messages

    whm/configserver explorer/var/log/secure
     
    cPanelMichael likes this.
  7. SpaceCowboy

    SpaceCowboy Well-Known Member

    Joined:
    Jan 18, 2014
    Messages:
    54
    Likes Received:
    4
    Trophy Points:
    8
    cPanel Access Level:
    Website Owner
    Wow 800 users on a VPS! i thought you needed at least a dedicated server for that kind of traffic, specially on wordpress site which isn't exactly optimized specially when you add fancy themes and plugins.
     
Loading...

Share This Page