I've recently been facing hugely increased server response time for some of my web pages (response time in the range of 10-20 seconds).
For example, for the page http://www.edmhunters.com/afrojack/ - Google Page Speed Test says the server responded quickly (meaning it's under 200 ms).
For another page with the same view and template - http://www.edmhunters.com/skrillex/ - Google Page Speed Test says the server response time is 10.3 seconds.
Is it safe to assume that the fault lies somewhere in my server configuration and has nothing to do with the code itself?
My website is a Django application using Nginx, Gunicorn, PostgreSQL and Memcached hosted on DigitalOcean(1GB Ram, 30GB SSD Disk, Ubuntu 14.04 x64).
Following are some of my configuration settings for Nginx
worker_processes 4;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
gzip on;
server {
listen 80;
client_max_body_size 4G;
server_name www.edmhunters.com;
keepalive_timeout 5;
}
}
For Gunicorn i've set the number of workers to 3. Any suggestions on what could be wrong here? I'm pretty much a noob when it comes to server hosting and this thing has kept me baffled for quite some time now.