Hi,

I'm very new to server administration, and I cannot find some tech guys to
help me currently.  My server is almost down, actually it was down this
morning, but alive this afternoon.

I got a lot of error log like

2011/03/08 17:04:46 [error] 8041#0: *390310 upstream prematurely closed
> connection while reading response header from upstream, client:
> 114.255.28.23, server: 17bdc.com, request: "GET / HTTP/1.1", upstream:
> "uwsgi://192.168.155.99:8088"
>

The error causes a lot of request abortions or timeouts, and the server is
very very slow.

Thanks for your suggestions and possible fixes in advance.

All my servers below are instances on linode vps. I'm thinking if any
relevance with vps.


*server structures:*
 nginx server (svr nginx) + nginx_server_app (srv nginx_app) + 3 apps server
(svr app1-3)
                                                  + 3 apps server ( svr4-6)
                                                  + 1 db server(db) + 1
memcached server (memcached)

svr app1-3 serve heavily  loaded urls: /reviews/fetch/, /review/status/.
srv app4-6 serve all the other urls

*nginx configuration:*

worker_processes  7;

events {
worker_connections  8192;
use epoll;
}
http {
    # default nginx location
    include        /usr/local/nginx/conf/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';
    client_header_timeout  3m;
    client_body_timeout    3m;
    send_timeout           3m;
    connection_pool_size        256;
    client_header_buffer_size    1k;
    large_client_header_buffers    4 2k;
    request_pool_size        4k;
    output_buffers   4 32k;
    postpone_output  1460;
    sendfile        on;
    tcp_nopush             on;
    keepalive_timeout      75 20;
    tcp_nodelay            on;
    client_max_body_size       10m;
    client_body_buffer_size    256k;
    client_body_temp_path
/home/beeblio/develop/workspace/log/client_body_temp;
#/home/yourusername/projects/myproject/log/client_body_temp;
    uwsgi_temp_path       /home/beeblio/develop/workspace/log/uwsgi_temp/;
    gzip on;
    gzip_min_length  1100;
    gzip_buffers     4 32k;
    gzip_types       text/plain application/javascript
application/x-javascript text/xml text/css;
    ignore_invalid_headers    on;
    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 50;
    fastcgi_read_timeout 3000;
    uwsgi_connect_timeout 60;
    uwsgi_send_timeout 50;
    uwsgi_read_timeout 50;
    proxy_read_timeout 60;
    proxy_send_timeout 6;
    include sites-enabled/*;
}


-- 
Samuel
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to