Forum: NGINX writev() failed (104: Connection reset by peer)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Daca38df8a2e85e5675d327194e71dc2?d=identicon&s=25 Zsu Frog (zsufrog)
on 2009-02-06 08:22
every time, when I login in my site  ,they happened. I just can get a
error blank page.


---LOGS------------------------------------------------------------------------

2009/02/06 11:19:51 [info] 32745#0: *1 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
2009/02/06 11:20:01 [info] 32745#0: *3 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
2009/02/06 11:21:09 [info] 32745#0: *6 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
2009/02/06 11:23:03 [notice] 368#0: using the "epoll" event method
2009/02/06 11:23:03 [warn] 368#0: 2048 worker_connections are more than
open file resource limit: 1024
2009/02/06 11:23:03 [notice] 368#0: nginx/0.6.34
2009/02/06 11:23:03 [notice] 368#0: built by gcc 4.3.2 (Ubuntu
4.3.2-1ubuntu11)
2009/02/06 11:23:03 [notice] 368#0: OS: Linux 2.6.27-7-server
2009/02/06 11:23:03 [notice] 368#0: getrlimit(RLIMIT_NOFILE): 1024:1024
2009/02/06 11:23:03 [notice] 369#0: start worker processes
2009/02/06 11:23:03 [notice] 369#0: start worker process 370
2009/02/06 11:23:11 [info] 370#0: *1 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
2009/02/06 11:23:11 [info] 370#0: *4 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
2009/02/06 11:24:06 [info] 370#0: *9 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
2009/02/06 11:24:06 [info] 370#0: *11 writev() failed (104: Connection
reset by peer) while sending to client, client: 202.116.94.64, server:
202.116.94.254, request: "GET /zsuxg/image/skin/0/main_13.gif HTTP/1.1",
upstream: "http://202.116.64.11:9080/zsuxg/image/skin/0/main_...,
host: "202.116.94.254", referrer: "http://202.116.94.254/zsuxg/"
2009/02/06 11:26:01 [info] 370#0: *15 client 202.116.94.64 closed
keepalive connection
2009/02/06 11:26:01 [info] 370#0: *17 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
2009/02/06 11:26:01 [info] 370#0: *19 writev() failed (104: Connection
reset by peer) while sending to client, client: 202.116.94.64, server:
202.116.94.254, request: "GET /zsuxg/image/skin/0/page_bg.gif HTTP/1.1",
upstream: "http://202.116.64.11:9080/zsuxg/image/skin/0/page_...,
host: "202.116.94.254", referrer: "http://202.116.94.254/zsuxg/"
2009/02/06 15:00:04 [notice] 3035#0: using the "epoll" event method
2009/02/06 15:00:04 [warn] 3035#0: 2048 worker_connections are more than
open file resource limit: 1024
2009/02/06 15:00:04 [notice] 3035#0: nginx/0.6.34
2009/02/06 15:00:04 [notice] 3035#0: built by gcc 4.3.2 (Ubuntu
4.3.2-1ubuntu11)
2009/02/06 15:00:04 [notice] 3035#0: OS: Linux 2.6.27-7-server
2009/02/06 15:00:04 [notice] 3035#0: getrlimit(RLIMIT_NOFILE): 1024:1024
2009/02/06 15:00:04 [notice] 3036#0: start worker processes
2009/02/06 15:00:04 [notice] 3036#0: start worker process 3037
2009/02/06 15:00:12 [info] 3037#0: *3 writev() failed (104: Connection
reset by peer) while sending to client, client: 202.116.94.64, server:
202.116.94.254, request: "GET /zsuxg/image/skin/0/page_bg.gif HTTP/1.1",
upstream: "http://202.116.64.11:9080/zsuxg/image/skin/0/page_...,
host: "202.116.94.254", referrer: "http://202.116.94.254/zsuxg/"
2009/02/06 15:01:00 [info] 3037#0: *8 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)
~
----------------------------------------------------------------------------

my nginx.conf setting:

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
error_log  logs/error.log  debug;


#pid        logs/nginx.pid;


events {
    worker_connections  2048;
}


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

    log_format up_head '$remote_addr - $remote_user [$time_local]
$request '
                       'upstream_http_content_type
$upstream_http_content_type';


    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  logs/access.log  debug;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;

    #gzip  on;


    upstream mysvr {
                server 202.116.64.11:9080;
                server 202.116.64.11:9080;
                hash   $request_uri;
        }

    server {
        listen       80;
        server_name  202.116.94.254;

        keepalive_timeout  10000;
    proxy_connect_timeout 2400;
    proxy_read_timeout 2400;
    proxy_send_timeout 2400;
    client_max_body_size 10m;
    proxy_ignore_client_abort  on;


        client_header_buffer_size 4000k;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

        location /zsuxg/ {
            proxy_pass   http://mysvr/zsuxg/;
            proxy_redirect default;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }


        }




}

why writev() failed (104: Connection reset by peer) while sending to
client ??
~
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-02-06 11:13
(Received via mailing list)
On Fri, Feb 06, 2009 at 08:22:01AM +0100, Zsu Frog wrote:

> every time, when I login in my site  ,they happened. I just can get a
> error blank page.

These lines:

2009/02/06 11:19:51 [info] 32745#0: *1 client 202.116.94.64 closed
keepalive connection (104: Connection reset by peer)

are usually normal: MSIE closes keepalie connection using RST packet.
However, these ones:

2009/02/06 11:24:06 [info] 370#0: *11 writev() failed (104: Connection
reset by peer) while sending to client, client: 202.116.94.64, server:
202.116.94.254, request: "GET /zsuxg/image/skin/0/main_13.gif HTTP/1.1",
upstream: "http://202.116.64.11:9080/zsuxg/image/skin/0/main_...,
host: "202.116.94.254", referrer: "http://202.116.94.254/zsuxg/"

are strange.
103e3ecb1c838c6c7e52a0ee12ee6e1a?d=identicon&s=25 Glen Lumanau (Guest)
on 2009-04-27 05:16
(Received via mailing list)
2009/2/6 Igor Sysoev <is@rambler-co.ru>

> are usually normal: MSIE closes keepalie connection using RST packet.
> However, these ones:
>
> 2009/02/06 11:24:06 [info] 370#0: *11 writev() failed (104: Connection
> reset by peer) while sending to client, client: 202.116.94.64, server:
> 202.116.94.254, request: "GET /zsuxg/image/skin/0/main_13.gif HTTP/1.1",
> upstream: "http://202.116.64.11:9080/zsuxg/image/skin/0/main_...,
> host: "202.116.94.254", referrer: "http://202.116.94.254/zsuxg/"
>
> are strange.

I also got this error on my nginx error log.
Is there any way to fix this?
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2009-04-27 10:35
(Received via mailing list)
Hello!

On Mon, Apr 27, 2009 at 10:06:30AM +0700, Glen Lumanau wrote:

> > keepalive connection (104: Connection reset by peer)
> > are strange.
>
> I also got this error on my nginx error log.
> Is there any way to fix this?

It's not error, it's just information that client closed
connection.

Maxim Dounin
This topic is locked and can not be replied to.