Intermittent Issues With Website Loading Speed

dc1177

Member
Jun 13, 2019
13
1
3
Sweden
cPanel Access Level
Root Administrator
Hello, I hope this is in the correct section.

Sometimes my site will load super slow. It is kinda "random" and when it happens it might take from 19 to almost 30 seconds to load and we are talking about 72 KB (670 KB in total but served from memory cache).

After that and for some time it will be loading with normal speeds. Then at a "random" time it will take again too long.

At first I thought it would be some cache related issue but now I believe this is not the case..

I have 2 sites, one of them WordPress and the other one different cms. Both of them are in PHP7.2.

I am suspecting something is wrong with my SSL(it uses the auto generated SSL WHM offers out of the box).

I noticed in the following log:
/opt/cpanel/ea-php72/root/usr/var/log/php-fpm/error.log

The error below is logged:
Code:
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*   Trying xxx.xxx.xxx.xxx:443..."
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* TCP_NODELAY set"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* Connected to www.example.com (xxx.xxx.xxx.xxx) port 443 (#0)"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* ALPN, offering h2"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* ALPN, offering http/1.1"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* successfully set certificate verify locations:"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*   CAfile: /etc/pki/tls/certs/ca-bundle.crt"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "  CApath: none"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* ALPN, server accepted to use http/1.1"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "* Server certificate:"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*  subject: CN=example.com"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*  start date: Jul  5 00:00:00 2019 GMT"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*  expire date: Oct  3 23:59:59 2019 GMT"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*  subjectAltName: host "www.example.com" matched cert's "www.example.com""
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*  issuer: C=US; ST=TX; L=Houston; O=cPanel, Inc.; CN=cPanel, Inc. Certification Authority"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "*  SSL certificate verify ok."
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "> GET /utility/tasks?notrigger=1&key=6935195b&pid=0774406135 HTTP/1.1^M"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "Host: www.example.com^M"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "Accept: */*^M"
[09-Aug-2019 08:37:50] WARNING: [pool example_user] child 15405 said into stderr: "^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "* Mark bundle as not supporting multiuse"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< HTTP/1.1 200 OK^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Date: Fri, 09 Aug 2019 08:37:50 GMT^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Server: Apache^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Expires: Thu, 19 Nov 1981 08:52:00 GMT^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Cache-Control: no-store, no-cache, must-revalidate^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Pragma: no-cache^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Set-Cookie: PHPSESSID=bd51f90b2fd88b00921741ac504aae49; path=/^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Set-Cookie: en4_language=en; expires=Sat, 08-Aug-2020 08:37:50 GMT; Max-Age=31536000; path=/^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Set-Cookie: en4_locale=en_US; expires=Sat, 08-Aug-2020 08:37:50 GMT; Max-Age=31536000; path=/^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Vary: Accept-Encoding^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Transfer-Encoding: chunked^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< Content-Type: text/html; charset=UTF-8^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "< ^M"
[09-Aug-2019 08:37:51] WARNING: [pool example_user] child 15405 said into stderr: "* Connection #0 to host www.example.com left intact"
The error above is logged every time I visit my website so not sure how it affects the slow load sometimes. But maybe an indicator of what is going wrong.

Please notice the screenshots I attach from chrome devtools.

Code:
# grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf
/etc/redhat-release:CentOS Linux release 7.6.1810 (Core)
/usr/local/cpanel/version:11.82.0.8
/var/cpanel/envtype:standard
CPANEL=release

Server specs
CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
RAM: 64 GB
SATA Disks with plenty of space
Connection: 1Gbps

Maybe 5 active sites in the whole server.


Any suggestion and help would be appreciated.
 

Attachments

Last edited by a moderator:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
HI @dc1177

Looking through tickets I've found one other instance of an issue similar to this where the SSL details are being outputted into the PHP-FPM log - it doesn't look like there's an issue with the SSL though, in either your case or the one I found in our ticket system. What the suggestion was there was to increase the timeout for PHP-FPM to prevent the session from expiring which is what was causing the other user to have long load times.

You can increase the PHP-FPM timeout from WHM>>Software>>MultiPHP Manager -> System PHP-FPM Configuration
 

dc1177

Member
Jun 13, 2019
13
1
3
Sweden
cPanel Access Level
Root Administrator
@cPanelLauren thank you for replying!

I increased the "Process Idle Timeout" from 10 to 20 and tried to load my site. This time it took 38 seconds! It is the longest I have ever seen in my case.

So should I maybe get rid of php-fpm? Can I disable it for my site just to see if anything changes or disabling it would break other stuff?
 

dc1177

Member
Jun 13, 2019
13
1
3
Sweden
cPanel Access Level
Root Administrator
I disabled php-fpm for my site and it just took ages to load.. ended up giving error "site could not be reached".. then after 25 seconds loaded.

Could something be wrong with my DNS?

I think another website I have on the server which runs on php 5.6 does not have this issue..
 
Last edited:

dc1177

Member
Jun 13, 2019
13
1
3
Sweden
cPanel Access Level
Root Administrator
Hello again.

After googling and searching through this forum I decided to disable OCSP (suggested in another thread). Since then, the problem seems to be gone.

I noticed that when I disabled the OCSP, about 4 services were restarted automatically (silly me did not write the names down).

I have to verify somehow that OCSP is causing the issue so I am planning to do the following:

-I will wait for another day to see if the problem appears again. Before disabling OCSP I would have the problem at least once every hour. So far no problem.
-I will re-enable OCSP and make sure to write down the services the system restarts automatically. I will wait for 1-2 days for the problem to appear again.

If the problem appears again it means that OCSP is probably causing the issue. If everything works fine, it might mean that the one or more of the services had to be restarted.

I am a bit worried as cPanel suggests OCSP to be enabled.

I will post again when I have news.
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
OCSP is the fastest protocol there is for verifying a certificate's status (determining whether or not a certificate is still valid or has been revoked) - it's an industry standard and really in normal circumstances shouldn't cause a delay like you were seeing. What would be helpful still is to check the output into the apache error logs when the issue occurred.
 

dc1177

Member
Jun 13, 2019
13
1
3
Sweden
cPanel Access Level
Root Administrator
Unfortunately (???) the issue disappeared after I disabled OCSP. I understand it was supposed to speed things up but for some reason it slowed things down..

I will have to do the test I mentioned in my previous post in order to verify or not that the issue was caused by OCSP.

In the meantime the log in /etc/apache2/logs/error_log shows the same error as mentioned above in my first post /opt/cpanel/ea-php72/root/usr/var/log/php-fpm/error.log . The error though still appears every time I visit my site,no matter if it is slow or not. No extra info..
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello @dc1177

That could work, if you're able to replicate the issue without OCSP enabled or if you'd like for OCSP to be enabled and you'd like for us to take a closer look at it I'd suggest opening a ticket with us, which can be done by using the link in my signature.


Thanks!
 

dc1177

Member
Jun 13, 2019
13
1
3
Sweden
cPanel Access Level
Root Administrator
I just re-enabled the "SSLUseStapling" and my site took 19.30 seconds right away to load so I disabled "SSLUseStapling" again.

What is a bit suspicious is the consistency of the time it takes to load each time.. 19.30, 19.26. 19.45.. those are the seconds I usually see..

I hope having "SSLUseStapling off " will not introduce any major security issues.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston

dc1177

Member
Jun 13, 2019
13
1
3
Sweden
cPanel Access Level
Root Administrator
cPanelLauren I noticed in the link you provided mentions that SSLUseStapling is by default off! Is there any chance that this changed in any recent cPanel/WHM update?

Anyway I will consider the issue as solved for now but I will probably try to investigate more on my free time. :D

Thanks again for the help!