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.

Having trouble getting Apache and server to perform well

Discussion in 'General Discussion' started by inspiredearth, Mar 7, 2018.

  1. inspiredearth

    inspiredearth Member

    Joined:
    Dec 1, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    New Zealand
    cPanel Access Level:
    Reseller Owner
    Hi folks,

    I took on assisting someone with their WHM/Cpanel server. It has a Wordpress site, which was having issues. The bulk of those issues where due to deficient PHP resources allocated in the php.ini settings. I fixed that, and the site was at least up and running fairly well. But the server was obviously still struggling, so using various threads in there forums, and elsewhere, I went about attempting to get things working better. I seems to have gone backwards, and I greatly appreciate some advice on what the issue(s) might be, and how to resolve.

    A major issue is that the TTFB has jumped up to 15212 ms. It was previously sitting around 500ms. I have no idea what has caused this, but it's a result of my attempts at "optimising" the server.


    All configuration changes I mention, were done through the relevant WHM control panels where possible.

    Here's the output from
    Code:
    grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf
    Code:
    /etc/redhat-release:CentOS release 6.9 (Final)
    /usr/local/cpanel/version:11.68.0.29
    /var/cpanel/envtype:standard
    CPANEL=release
    There was a lot of these errors occurring in the log at
    Code:
    /home/USER/logs/domain_com.php.error.log
    , which were occurring every second or two.

    Code:
    [Wed Mar 07 06:20:58.105867 2018] [mpm_worker:error] [pid 3226:tid 140524395653088] AH00288: scoreboard is full, not at MaxRequestWorkers
    
    In the /usr/local/apache/logs/error_log there are also a lot of entries like follows:

    Code:
    [Wed Mar 07 19:26:12.718357 2018] [core:error] [pid 28090:tid 140641207760640] [client 172.69.69.16:11513] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    
    Which seems to be a redirection loop, that I suspect W3TC is causing. Which is not WHM/Cpanel specific. I've disabled W3TC for now, to get rid of that issue, as I could not find the cause.

    I attempted making some changes to the Apache worker related settings in WHM, but none improved the situation, so I've currently reverted them to the defaults.

    I also attempted changing Apache over to mpm_event mode, as per info on this article ntorga.com/2016/11/tuning-optimizing-apache-cpanel-servers/ but it made the situation worse, so I reverted Apache back to how it was.

    Memcached
    I attempted to get Memcache/Memcached up and running. To implement some caching features with that via the W3TC caching plug-in on Wordpress. It made no noticeable difference.

    Uninstalling Memcache/d is about the only thing I've not reverted back to how the server was, in terms of significant changes. But I assume it's not going to have any impact if nothing is actually using it. Correct?

    Please advise what other information, such as configuration files, etc., would be useful to see. I will update this post with them.

    Thank you.
     
    #1 inspiredearth, Mar 7, 2018
    Last edited: Mar 7, 2018
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'll leave this thread open for additional user-feedback, but I did want to note that you may find the links in the following thread helpful:

    server optimization for wordpress

    Thank you.
     
  3. inspiredearth

    inspiredearth Member

    Joined:
    Dec 1, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    New Zealand
    cPanel Access Level:
    Reseller Owner
    Thanks. As that thread essential directs one to jump over to a fairly generic article on wordpress.org, shall I assume that is what you are suggesting?

    Or where you suggesting that thread to point me to the mysqlmonlite.sh script? I've installed that script (which is very handy, thanks), and can provide information from its output.

    As WHM/Cpanel has a it's only fairly unique way of implementing Apache, PHP-FPM, etc., I was hoping some veteran WHM/CP server user here might be able to point me in the right direction in terms of specifics.

    Cheers...
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I was referring to both the link and the MySQL tuning application. You may also want to reach out to a system administrator if you don't receive sufficient user-feedback:

    System Administration Services | cPanel Forums

    Thank you.
     
  5. inspiredearth

    inspiredearth Member

    Joined:
    Dec 1, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    New Zealand
    cPanel Access Level:
    Reseller Owner
    The only other thing I changed on the server, before TTFB jumped from around 500ms to as much as 15,000+, was the CSF firewall configurator.

    As the WP application uses Cloudflare, I added in ALLOW rules for all CF IP address ranges.

    I am wondering if the long wait for the first byte is due to something being blocked, like a DNS look-up or something?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You could try temporarily disabling CSF to verify it's the culprit. Additionally, as far as the TTFB, here is an existing thread where this is discussed:

    Extremely slow TTFB

    Thank you.
     
Loading...

Share This Page