• Configuration: Ubuntu 14.04 x64, Nginx 1.4.6, Varnish 4.0, php5-fpm, WordPress 4.0 + w3 Total Cache + Woocommerce + BWP minify.

    Website is placed at /var/www/sitename.com/public_html.

    Varnish configuration file /etc/varnish/default.vcl: http://pastebin.com/mXWupWUc

    Nginx main conf /etc/nginx/nginx.conf: http://pastebin.com/sc1cqkcQ

    Nginx virtual host conf /etc/nginx/sites-available/sitename : http://pastebin.com/sUiQeviY

    Php-fpm conf /etc/php5/fpm/pool.d/www.conf: http://pastebin.com/ywhPftPc

    W3 Total Cache: Minify Html (default) enabled, Database Cache (disk) enabled, Browser Cache enabled, Varnish Purge (Varnish servers: 127.0.0.1)

    Front-end works perfect. Average page load time ~ 1.3-1.7s. But sometimes (not always) when change something in panel (add new product or article), nginx (or php-fpm or something else) goes down. Log files don’t show me something critical about this crash. There are some errors about missing image or something like this and thats all.

    Help me, please to understand what i made wrong.

Viewing 3 replies - 1 through 3 (of 3 total)
  • If it is crashing then it mostly likely do to hitting a limit with memory. Here is a formula that I always follow when tweaking performance and reliability:

    Total Connections = worker_processes * worker_connections / (keepalive_timeout * 2);

    When setting worker processes, only set it to core processors * 2. If you set it higher, your server will hit a wall when it runs out of memory due to over compositing the workers.

    Also ensure to use opcode caching to limit a lot of the basic heavy lifting of the core.

    I run an optimized setup simuar to yours, a pretty graphic intensive site also using WooCommerce but your load times should be much better.

    worker_processes 4;
    – That should be worker_processes auto;

    user username;
    – Unless that is what you are using for the name, generally it’s nginx or www-data..

    chown -R www-data:www-data /var/www/sitename.com/public_html
    chmod -R 755 /var/www/sitename.com/public_html

    Honestly, You don’t even need varnish. And I’d remove all of the w3 total cache code from the sites-available as w3 total cache will write it’s own nginx.conf to your root directory.

    I’d run Nginx, Percona and PHP-FPM.

    I’d get rid of varnish as it’s not needed at all.

    For plugins, I use the following,

    W3 Total Cache, Disk Enhanced for page cache, and I use xcache 4 for db and object cache. Get rid of bwp minify, and install autoptimize plugin, just use the basic settings tab and only choose css and js minification.

    If you install google xml sitemaps, you can also install warm cache which you can generate all of your static pages. You just clear the aotoptimize cache, then switch to warm cache, past the link in a new browser and the crawler will write all of your static content.

    If you want a fast Nginx server, you can use my build that I run on zionwp.com and boi-infinity.com, https://github.com/zionwp/zionX or you can use the original engine I based mine on @ http://tengine.taobao.org/index.html

    The zionx engine has built in features to make clean code. You can view the static source of zionwp.com if you’d like to see.

    If you are interested, I can post all of the configs that I use along with the compile settings for the custom nginx server if you’d like to try my setup that I run on my sites.

    Chris

    @cbunting99,

    If possible, post your settings.
    I am searching for more info about zionx.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress ruining nginx’ is closed to new replies.