Hey guys, My CPU load is very high, resulting in me unable to login via ssh or accessing my website (long loading or time out). Im running nginx 1.4 and php5-fpm on ubuntu 14, on a 1 core / 1gb droplet. I’m running 4 Wordpress websites (one of them gets 200 hits per day/others not more then 50 combined) on 1 droplet. The php5-fpm pool for my main site is causing the extreme CPU load. The CPU load is definitely not normal right? Anyone know how I can find the root of the problem? thanks
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 need to scale your setup. 4 Wordpress sites it quite a lot for a droplet that size. Try caching your sites to reduce Wordpress rendering the same content. I’ve linked some good solutions below.
Additionally, upgrade to PHP7 for increased performance and enable OPCache in PHP. You may also want to upgrade to Nginx v1.6 stable. You should also remove any unused plugins (not just disabling, delete them). And to top it off, make sure your database is clean and optimized for you system. If you have a LAMP/LEMP stack, move the database to its own server as 4 Wordpress sites + a database on a single 1GB droplet is a bit too much. I’ve linked some DigitalOcean tutorials to get you started on some of these.
use cache look add install html minfty and use cache bro
http {
add_header rt-Fastcgi-Cache $upstream_cache_status;
fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;
fastcgi_param HTTP_IF_MODIFIED_SINCE $http_if_modified_since;
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
server_tokens off;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/ld+json application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-tt$
gzip_disable "MSIE [1-6]\.";
#set client body size to 2M #
client_max_body_size 20M;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
include /etc/nginx/naxsi_core.rules;
add this in default config
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|pdf|html|htm)$ {
expires max;
}
}
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.