Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: slow nginx problem
PostPosted: Thu Aug 29, 2013 6:34 am 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
I have 3 wordpress blogs (not very active). I moved one over a year ago to my linode and the page load time (using W3 Total Cache) dropped to between 0.5 and 1 sec, while the 2 remaining at Hostgator had page load times between 1.5 and 2 seconds. This week I moved the other 2. After the first the page load time also dropped to below 1 second, but 1 day after I moved the third page load times for all 3 are over 2 seconds. I have maybe 400 visitors a day (in total). Maybe it is not my server, maybe Linode or my ISP experiences lots of traffic, but I want to start looking what could be wrong.
I can't find any error messages in the log files (nginx, vhosts, php5-fpm).
I have been using http://whichloadsfaster.com/ for the page load times.

My default vhost config:

Code:
server {
    listen    80;
    server_name example.net;
    rewrite ^ http://www.example.net$request_uri permanent;
}

server {
    listen   80;
    server_name www.example.net;
    access_log /var/log/nginx/access-www.example.net.log;
    error_log /var/log/nginx/error-www.example.net.log;

    limit_conn zxmplnet 15;
    root /srv/www/example.net/www;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }


    include /etc/nginx/loc_php.inc;

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }

    location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
       expires max;
       log_not_found off;
    }

    rewrite /wp-admin$ $scheme://$host$uri/ permanent;


    location /nginx_status {
        stub_status on;
        access_log off;
    }

    include /srv/www/example.net/www/nginx.conf;

    location ~ /nginx.conf {
        deny all;
        access_log off;
        log_not_found off;
    }
}



the /etc/nginx/loc_php.inc:
Code:
location ~ \.php$ {
   include /etc/nginx/fastcgi_params;
   fastcgi_pass unix:/var/run/php5-fpm/www.socket;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   fastcgi_read_timeout 1800;
   fastcgi_ignore_client_abort on;
}


Top
   
 Post subject: Re: slow nginx problem
PostPosted: Sat Aug 31, 2013 5:17 am 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
No responses, so my configuration is probably alright. I found the cause. The problem wasn't my server or my site. The problem was the other site.
When you use http://whichloadsfaster.com/ you compare the page load time for 2 sites. I use it mainly to measure the page load times for my sites. It hadn't occurred to me that the other site might influence the page load time of my site. So when I compare my wordpress blog against a static, html-only site, the page load time is below 1 second. When I compare my site against a newssite the page load time of my site doubles, and sometimes even triples. The cause: Flash. Regardless of the browser (firefox, chrome, safari), when the flash-plugin gets active it slows things down.

Moral of the story: when using http://whichloadsfaster.com/ use it to compare your site to a similar site. If you want to use it only to determine your site's page load time pick a static, html only site to compare it with, or leave it empty.


Top
   
 Post subject: Re: slow nginx problem
PostPosted: Thu Sep 05, 2013 1:01 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
I use this sometimes:
http://tools.pingdom.com/fpt/
and
http://www.webpagetest.org/


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group