Forum: NGINX Connection reset by peer error!

13731c628e20ffd83b6114ff2c406272?d=identicon&s=25 shahzaib mushtaq (shahzaib12)
on 2014-06-02 11:05
(Received via mailing list)
Hello,

         We're using nginx as reverse proxy in front of apache and
following error occurs most of the time :

2014/06/02 01:00:28 [error] 3288#0: *6492138 recv() failed (104:
Connection
reset by peer) while reading response header from upstream, client:
141.0.10.83, server: domain.com, request: "GET /rss/recent HTTP/1.1",
upstream: "http://127.0.0.1:7172/rss/recent", host: "domain.com"
2014/06/02 01:00:29 [error] 3288#0: *6492143 recv() failed (104:
Connection
reset by peer) while reading response header from upstream, client:
141.0.8.54, server: domain.com, request: "GET /rss/recent HTTP/1.1",
upstream: "http://127.0.0.1:7172/rss/recent", host: "domain.com"
2014/06/02 01:00:31 [error] 3285#0: *6492195 recv() failed (104:
Connection
reset by peer) while reading response header from upstream, client:
119.160.119.47, server: domain.com, request: "GET
/video/2437706/18-xxx-sex-hot HTTP/1.1", upstream: "
http://127.0.0.1:7172/video/2437706/18-xxx-sex-hot", host: "domain.com",
referrer: "http://www.google.com.pk/search?hl=en&ie=ISO-8859-...

Following is the nginx.conf :

user  tune;
# no need for more workers in the proxy mode
worker_processes  16;
error_log  /var/log/nginx/error.log error;
error_log  /var/log/nginx/error.log crit;
#error_log  /var/log/nginx/error.log;
worker_rlimit_nofile 409600;
events {
 worker_connections 102400; # increase for busier servers
 use epoll; # you should use epoll here for Linux kernels 2.6.x
}
http {
 server_name_in_redirect off;
 server_names_hash_max_size 10240;
 proxy_read_timeout 900;
 fastcgi_read_timeout 900;
 server_names_hash_bucket_size 1024;
 include    mime.types;
 default_type  application/octet-stream;
 server_tokens off;
 sendfile on;
 tcp_nopush on;
 tcp_nodelay on;
 keepalive_timeout  5;
 gzip on;
 gzip_vary on;
 gzip_disable "MSIE [1-6]\.";
 gzip_proxied any;
 gzip_http_version 1.0;
 gzip_min_length  1000;
 gzip_comp_level  6;
 gzip_buffers  16 8k;
# You can remove image/png image/x-icon image/gif image/jpeg if you have
slow CPU
 gzip_types    text/plain text/xml text/css application/x-javascript
application/javascript application/xml application/xml+rss
text/javascript
application/atom+xml;
 ignore_invalid_headers on;
 client_header_timeout  3m;
 client_body_timeout 3m;
 send_timeout     3m;
 reset_timedout_connection on;
 connection_pool_size  256;
 client_header_buffer_size 256k;
 large_client_header_buffers 4 256k;
 client_max_body_size 2000M;
 client_body_buffer_size 128k;
 request_pool_size  32k;
 output_buffers   4 32k;
 postpone_output  1460;
 client_body_in_file_only on;
 log_format bytes_log "$msec $bytes_sent .";
 include "/etc/nginx/conf.d/virtual.conf";
include "/etc/nginx/conf.d/beta.conf";
include "/etc/nginx/conf.d/admin.conf";
#include "/etc/nginx/conf.d/admin-ssl.conf";

}

Regards.
Shahzaib
1266aa99d1601b47bbd3ec22affbb81c?d=identicon&s=25 B.R. (Guest)
on 2014-06-02 12:07
(Received via mailing list)
'18-xxx-sex-hot' :oD

Pro.
---
*B. R.*


On Mon, Jun 2, 2014 at 11:04 AM, shahzaib shahzaib
<shahzaib.cb@gmail.com>
13731c628e20ffd83b6114ff2c406272?d=identicon&s=25 shahzaib mushtaq (shahzaib12)
on 2014-06-02 12:14
(Received via mailing list)
Lol, well that was some URL link on our website :-D. Could you please
help
me instead of enjoying the xxx words :p
13731c628e20ffd83b6114ff2c406272?d=identicon&s=25 shahzaib mushtaq (shahzaib12)
on 2014-06-02 12:15
(Received via mailing list)
The website content is similar to youtube, random stuff. :-) Don't get
it
wrong. It's not a porn website :)


On Mon, Jun 2, 2014 at 3:13 PM, shahzaib shahzaib
<shahzaib.cb@gmail.com>
13731c628e20ffd83b6114ff2c406272?d=identicon&s=25 shahzaib mushtaq (shahzaib12)
on 2014-06-02 15:18
(Received via mailing list)
kept on getting those timeouts.

recv() failed (104: Connection reset by peer) while reading response
header
from upstream


On Mon, Jun 2, 2014 at 3:15 PM, shahzaib shahzaib
<shahzaib.cb@gmail.com>
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-06-02 16:52
(Received via mailing list)
Hello!

On Mon, Jun 02, 2014 at 02:04:45PM +0500, shahzaib shahzaib wrote:

> Hello,
>
>          We're using nginx as reverse proxy in front of apache and
> following error occurs most of the time :
>
> 2014/06/02 01:00:28 [error] 3288#0: *6492138 recv() failed (104: Connection
> reset by peer) while reading response header from upstream, client:
> 141.0.10.83, server: domain.com, request: "GET /rss/recent HTTP/1.1",
> upstream: "http://127.0.0.1:7172/rss/recent", host: "domain.com"

[...]

Your upstream server isn't working properly, and resets
connections.  There is more or less nothing to do on nginx side,
try looking into the upstream server instead.

--
Maxim Dounin
http://nginx.org/
13731c628e20ffd83b6114ff2c406272?d=identicon&s=25 shahzaib mushtaq (shahzaib12)
on 2014-06-02 18:29
(Received via mailing list)
thanks @Maxim, our upstream server is apache and there are not any
suspicious error_logs in apache. We're getting one reset error every 3
hours. Is there any clue to find the root cause of apache problem ?

I know its nginx forum, sorry for off-topic.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.