Can someone point me in the right direction to figuring out what is going on with this? My server will skyrocket (seemingly) randomly in terms of CPU / Memory usage. Seems mysqld and php-fpm will cause the usage to go crazy. It only happens for a short time, and then things go back to normal.
This is what my graph looks like:
This causes my PHP based sites (Wordpress) to crash.
Thoughts?
Thanks in advance!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You’ve narrowed the issue down to mysql/php and since you are running WordPress my guess would be that you have a plugin or theme that is doing something to max out your resource usage.
Do these spikes occur only when someone is viewing the site or randomly even when there is no traffic? If it’s the later I would recommend checking any cron jobs (scheduled tasks) that your plugins may be using. A plugin designed to back up your WP site could potentially cause a spike like this when it dumps the whole database through php to a file.
If you are running 3rd party plugins the best way to determine the source of the issue would be to disable these plugins and re-enable them one at a time to see if the issue recurs after a particular one is running. You can also check your access and error logs during the times of the spikes to see if anything is recorded.
Nginx access/error logs are in:
/var/log/nginx/
PHP-fpm logs can be found in:
/var/log/php-fpm/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.