Welcome! Log In Create A New Profile

Advanced

Nginx loads pages very slow

Posted by rrodriguez 
Nginx loads pages very slow
March 29, 2012 08:41AM
Guys, I am new to this forum. I am so new to Nginx and I have inherited this webserver. Before I make the decision to jank out Nginx and replace it with old reliable Apache, I thought I would give it a try.

We are currently have a few issues with nginx or php-fastcgi. I am not sure which one it is but here is the scenerio.

Our first problem is that the server loads pages very slow. I mean it takes 10 seconds to load a page with some static content. Nothing crazy.

The other problem that I run into is that sometimes I get the following error: upstream timed out (110: Connection timed out) while reading response header from upstream, client:

Here is part of my nginx configuration:
user nginx;
worker_processes 4;

error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;


#----------------------------------------------------------------------
# Events Module
#
# http://wiki.nginx.org/NginxHttpEventsModule
#
#----------------------------------------------------------------------

events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;
rewrite_log on;

server_tokens off;

sendfile on;
#tcp_nopush on;

keepalive_timeout 4;
#keepalive_timeout 10 10;

gzip on;

client_max_body_size 10m;
client_body_buffer_size 128k;

# The default server
#
server {
listen 80;
server_name _;






Can anyone take a look at this and tell me if you can see anything that is wrong. If you need any other config file, please let me know.

Thanks
Rick R.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 229
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready