magick

Active Member
Oct 2, 2021
38
3
8
Italy
cPanel Access Level
Reseller Owner
Hi guys,

my WordPress site sometimes have an excessive consumption of hosting resources, for example CPU usage or entry process at 99%, also at night. The site is low traffic. The hosting provider says that cPanel don't have a function to see what activities or process cause this work peaks. How I can take this information? Please not that I haven't SSH access.

Thank you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,617
2,624
363
cPanel Access Level
Root Administrator
Hey there! Without SSH access, your hosting provider should be the ones to help you troubleshoot this, as there really isn't much you'll be able to do. While they are correct that cPanel doesn't necessarily have a tool that will tell you everything that is wrong with a site, a server manager would be able to watch the traffic in real-time and see what page is being reached.

You may be able to visit the statistics area in cPanel and see if there are an unusual number of page accesses during a certain time, but it's really up to the host to let you know what is going on in this case since your account is limited.
 
  • Like
Reactions: Maccess

magick

Active Member
Oct 2, 2021
38
3
8
Italy
cPanel Access Level
Reseller Owner
Hi, I reopen this topic because the provider have activated me SSH access. It suggest me using PuTTY.
The provider doesn't want to collaborate, but webmaster needs to know the reason why there is an excessive consumption of CPU usage. I attach the screenshot of resource usage page of cPanel. I hope you can help me.

Thank you.
 

Attachments

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
576
266
138
IN
cPanel Access Level
Root Administrator
From SSH try to analyze the running processes using top -cd3 utility.

You can share the top command output here so the community can help you further.
 

magick

Active Member
Oct 2, 2021
38
3
8
Italy
cPanel Access Level
Reseller Owner
From SSH try to analyze the running processes using top -cd3 utility.

You can share the top command output here so the community can help you further.
Hello, thank you. Sorry, I don't know how to use SSH, can you clear me how to extract the requested output? Must I insert "top -cd3" in command line?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,617
2,624
363
cPanel Access Level
Root Administrator
That article is actually for an individual cPanel user. Unless you are accessing things as "root" for your username, you don't have root access to the machine, and you'll have great difficulty trying to track down CPU usage.
 

magick

Active Member
Oct 2, 2021
38
3
8
Italy
cPanel Access Level
Reseller Owner
That article is actually for an individual cPanel user. Unless you are accessing things as "root" for your username, you don't have root access to the machine, and you'll have great difficulty trying to track down CPU usage.
Hi, can I try anyway to use "top -cd3" command and share the output here?
If so, I have already a issue to use puTTY: following the guide I have an error. I attach the screenshot of that and the puTTY configuration. I don't know if you can help me also for this. The provider says that server side everything works correctly.
Thank you.
 

Attachments

sparek-3

Well-Known Member
Aug 10, 2002
2,174
281
388
cPanel Access Level
Root Administrator
I kind of doubt that you have root. If you have root, you typically know that you have root.

What plugins are you using on your WordPress site? How many plugins? Are the plugins up to date? Are the plugins still being developed by their developers? (i.e. If a plugin was last updated in 2018, it's PROBABLY abandoned). Older plugins may not be performing tasks in an optimal manner.

Posting the answers to these questions here probably isn't going to provide any resolution. I suppose you might luck out and find someone that also had a similar issue with a certain plugin.

My BEST guess - if this is only happening around a certain time - is that one of these plugins is scheduling a task in the wp-cron and the wp-cron is executing this task around a certain time and that's causing your high CPU usage. What that task is? Where to find that task? What plugin is responsible for that task? Can that task be disabled? Those are all questions that I won't be able to answer.

The more plugin you use - that's just more code that each website request will have to filter through. I don't know if there is a dead set "don't use over X number of plugins", but the more plugins you use the more your account is having to work to render pages, the higher the chances are they you have a sub optimal coded plugin, and also the higher the attack surface area you have for security threats.

The principle of least privilege is kind of in play here in regards to plugin usage. The principle of least privilege states that you don't give an entity more privileges than they need to perform a task. The role plugins in play in WordPress in regards to this can be understated. Do you really need a plugin to perform xyz task? What else does that open you up to just to perform the xyz task?
 

magick

Active Member
Oct 2, 2021
38
3
8
Italy
cPanel Access Level
Reseller Owner
@magick - do you see the cPanel >> Terminal application available inside your cPanel account? If so, that would let you use SSH directly from your browser.
Yes, I see Terminal application in cPanel! I have used here the command top - cd3, please look at the screenshot.


I kind of doubt that you have root. If you have root, you typically know that you have root.

What plugins are you using on your WordPress site? How many plugins? Are the plugins up to date? Are the plugins still being developed by their developers? (i.e. If a plugin was last updated in 2018, it's PROBABLY abandoned). Older plugins may not be performing tasks in an optimal manner.

Posting the answers to these questions here probably isn't going to provide any resolution. I suppose you might luck out and find someone that also had a similar issue with a certain plugin.

My BEST guess - if this is only happening around a certain time - is that one of these plugins is scheduling a task in the wp-cron and the wp-cron is executing this task around a certain time and that's causing your high CPU usage. What that task is? Where to find that task? What plugin is responsible for that task? Can that task be disabled? Those are all questions that I won't be able to answer.

The more plugin you use - that's just more code that each website request will have to filter through. I don't know if there is a dead set "don't use over X number of plugins", but the more plugins you use the more your account is having to work to render pages, the higher the chances are they you have a sub optimal coded plugin, and also the higher the attack surface area you have for security threats.

The principle of least privilege is kind of in play here in regards to plugin usage. The principle of least privilege states that you don't give an entity more privileges than they need to perform a task. The role plugins in play in WordPress in regards to this can be understated. Do you really need a plugin to perform xyz task? What else does that open you up to just to perform the xyz task?
Hello, this happen at different times. On certain days there are resource consumption more than in other. However I can try to see the cron job. In this moment I have 9 plugins: GDPR cookie compliance, WordPress Import, Loginnizer security, Optimize Database, WP All Export, WP All Import, WP Super Cache, WPML Multilingual and Yoast SEO. Except for one (WordPress Import, ) all plugins have good reviews and they are constantly updated.
 

Attachments