High CPU usage
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.
-
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. 0 -
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. 0 -
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.0 -
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?0 -
Yes, that is an SSH command you can use by just typing that in to the command line. Do you have root access to the server? 0 -
Yes, that is an SSH command you can use by just typing that in to the command line. Do you have root access to the server?
I think I have root access. The provider send me this article to connect to the server via SSH: SSH Access with public and private key in cPanel - Keliweb0 -
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. 0 -
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.0 -
@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. 0 -
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? 0 -
@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.0 -
If you only have cPanel access you won't be able to properly see everything happening with the top command. It would be best to reach out to your host to see if they can get you better details. 0
Please sign in to leave a comment.
Comments
12 comments