# Upstream sent too many data while reading

**URL:** <https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641>\
**Category:** NGINX\
**Created:** [October 9, 2011, 9:35am UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641 "2011-10-09T09:35:12Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [October 9, 2011, 9:35am UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/1 "2011-10-09T09:35:12Z")

</div>

hi;

I use 1.1.5 my error.log

upstream sent too many data while reading upstream

how to fix it …

Posted at Nginx Forum:

> **[upstream sent too many data while reading](https://forum.nginx.org/read.php?2,216416,216416#msg-216416)**
>
> hi; I use 1.1.5 my error.log upstream sent too many data while reading upstream how to fix it ..

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 9, 2011, 10:44pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/2 "2011-10-09T22:44:25Z")

</div>

Hello!

On Sun, Oct 09, 2011 at 03:34:23AM -0400, codetr wrote:

> hi;
> 
> I use 1.1.5 my error.log
> 
> upstream sent too many data while reading upstream
> 
> how to fix it ..

Your backend tries to send more data than advertized in  
Content-Length header. Fixing backend may be a good idea.

Maxim D.

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 10, 2011, 12:48am UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/3 "2011-10-10T00:48:22Z")

</div>

How do I make it

Posted at Nginx Forum:

> **[Re: upstream sent too many data while reading](https://forum.nginx.org/read.php?2,216416,216444#msg-216444)**
>
> hi; I use 1.1.5 my error.log upstream sent too many data while reading upstream how to fix it ..

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 10, 2011, 5:32pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/4 "2011-10-10T17:32:20Z")

</div>

pls help me my system  
reverse proxy nginx use to nginx 1.1.5  
WHM 11.30.4 (build 6)  
CENTOS 4.9 x86\_64 virtuozzo

Posted at Nginx Forum:

> **[Re: upstream sent too many data while reading](https://forum.nginx.org/read.php?2,216416,216463#msg-216463)**
>
> hi; I use 1.1.5 my error.log upstream sent too many data while reading upstream how to fix it ..

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 10, 2011, 8:03pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/5 "2011-10-10T20:03:46Z")

</div>

So why, at the same time each day nginx closes

Posted at Nginx Forum:

> **[Re: upstream sent too many data while reading](https://forum.nginx.org/read.php?2,216416,216469#msg-216469)**
>
> hi; I use 1.1.5 my error.log upstream sent too many data while reading upstream how to fix it ..

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 10, 2011, 6:08pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/6 "2011-10-10T18:08:50Z")

</div>

Hello!

On Sun, Oct 09, 2011 at 06:47:52PM -0400, codetr wrote:

> How do I make it

Log line in question contains request and backend server  
responsible for request processing. The problem is not in nginx,  
it’s in your backend. You have to find out problematic code in  
your backend and fix it.

As I already said, problem is that your backend sent response with  
Content-Length which doesn’t match length of actual data sent.  
Most likely it’s some script which incorrectly calculates  
Content-Length.

Maxim D.

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 10, 2011, 9:09pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/7 "2011-10-10T21:09:46Z")

</div>

nginx closes every night; I could not find the cause ..

my nginx.conf

user nobody;

# no need for more workers in the proxy mode

worker\_processes 4;

error\_log /var/log/nginx/error.log;  
pid /var/run/nginx.pid;

worker\_rlimit\_nofile 8192;

events {  
worker\_connections 2048; # you might need to increase this setting for  
busy servers  
use epoll; # Linux kernels 2.4.x change to rtsig  
}

http {  
server\_names\_hash\_max\_size 8192;  
server\_names\_hash\_bucket\_size 256;  
include mime.types;  
default\_type application/octet-stream;

sendfile on;  
tcp\_nopush on;  
tcp\_nodelay on;

keepalive\_timeout 70;  
server\_tokens off;

gzip on;  
gzip\_min\_length 1100;  
gzip\_buffers 4 32k;  
gzip\_types text/plain application/x-javascript text/xml text/css;  
ignore\_invalid\_headers on;

client\_header\_timeout 10;  
client\_body\_timeout 10;  
send\_timeout 10;  
connection\_pool\_size 256;  
client\_header\_buffer\_size 4k;  
large\_client\_header\_buffers 4 32k;  
request\_pool\_size 4k;  
output\_buffers 4 32k;  
postpone\_output 1460;

include “/usr/local/nginx/conf/vhost.conf”;  
}

Is there a line or the wrong value?

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,216416,216478#msg-216478](http://forum.nginx.org/read.php?2,216416,216478#msg-216478)

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 10, 2011, 9:25pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/8 "2011-10-10T21:25:13Z")

</div>

Hello!

On Mon, Oct 10, 2011 at 03:09:07PM -0400, codetr wrote:

> nginx closes every night; I could not find the cause ..
> 
> my nginx.conf
> 
> user nobody;
> 
> # no need for more workers in the proxy mode
> 
> worker\_processes 4;
> 
> error\_log /var/log/nginx/error.log;

Try using

error\_log /var/log/nginx/error.log notice;

here, it will instruct nginx to log at “notice” level. This  
includes system events like controlling signal. I.e. on getting  
SIGINT nginx will log something like this:

2011/10/10 23:19:32 [notice] 24178#0: signal 2 (SIGINT) received,  
exiting  
2011/10/10 23:19:32 [notice] 24178#0: exit

I suspect the cause is some broken log-rotation script which kills  
nginx instead of instructing it to reopen logs.

(This is completely unrelated to “upstream sent too many data”  
messages though.)

Maxim D.

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 10, 2011, 8:30pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/9 "2011-10-10T20:30:55Z")

</div>

Hello!

On Mon, Oct 10, 2011 at 02:02:59PM -0400, codetr wrote:

> So why, at the same time each day nginx closes

ENOPARSE

Sorry, I cannot parse what you are trying to say.

Maxim D.

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 11, 2011, 8:34am UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/10 "2011-10-11T08:34:05Z")

</div>

Hello Again;

this log… nginx closes every night at the same time

2011/10/11 03:24:37 [notice] 1824#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 03:24:37 [notice] 1820#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 03:24:37 [notice] 1819#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 03:24:37 [notice] 1819#0: exiting  
2011/10/11 03:24:37 [notice] 1818#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 03:24:37 [notice] 1823#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 03:24:37 [notice] 1823#0: exiting  
2011/10/11 03:24:37 [notice] 1824#0: exiting  
2011/10/11 03:24:37 [notice] 1820#0: exiting  
2011/10/11 03:24:37 [notice] 1824#0: exit  
2011/10/11 03:24:37 [notice] 1820#0: exit  
2011/10/11 03:24:37 [notice] 1823#0: exit  
2011/10/11 03:24:37 [notice] 1819#0: exit  
2011/10/11 03:24:37 [notice] 1818#0: signal 17 (SIGCHLD) received  
2011/10/11 03:24:37 [notice] 1818#0: worker process 1819 exited with  
code 0  
2011/10/11 03:24:37 [notice] 1818#0: worker process 1820 exited with  
code 0  
2011/10/11 03:24:37 [notice] 1818#0: worker process 1823 exited with  
code 0  
2011/10/11 03:24:37 [notice] 1818#0: worker process 1824 exited with  
code 0  
2011/10/11 03:24:37 [notice] 1818#0: exit

Posted at Nginx Forum:

> **[Re: upstream sent too many data while reading](https://forum.nginx.org/read.php?2,216416,216487#msg-216487)**
>
> hi; I use 1.1.5 my error.log upstream sent too many data while reading upstream how to fix it ..

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 11, 2011, 8:43am UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/11 "2011-10-11T08:43:20Z")

</div>

Hello!

On Tue, Oct 11, 2011 at 02:33:25AM -0400, codetr wrote:

> 2011/10/11 03:24:37 [notice] 1819#0: exiting  
> 2011/10/11 03:24:37 [notice] 1818#0: signal 15 (SIGTERM) received,  
> exiting  
> 2011/10/11 03:24:37 [notice] 1823#0: signal 15 (SIGTERM) received,  
> exiting

Something sent SIGTERM to all nginx processes, and nginx exited  
cleanly due to explicit request to do so. Check your scripts to  
find out which one does it. (Looks like it’s ‘killall nginx’  
somewhere.)

Maxim D.

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 14, 2011, 1:26am UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/12 "2011-10-14T01:26:47Z")

</div>

the problem continues please help

Posted at Nginx Forum:

> **[Re: upstream sent too many data while reading](https://forum.nginx.org/read.php?2,216416,216667#msg-216667)**
>
> hi; I use 1.1.5 my error.log upstream sent too many data while reading upstream how to fix it ..

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 11, 2011, 8:58am UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/13 "2011-10-11T08:58:46Z")

</div>

# killall nginx

and

# service nginx restart

installed on my system  
mod\_rpaf-0.6  
pcre 8.13

2011/10/11 09:52:45 [notice] 32588#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 09:52:45 [notice] 32589#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 09:52:45 [notice] 32589#0: exiting  
2011/10/11 09:52:45 [notice] 32591#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 09:52:45 [notice] 32591#0: exiting  
2011/10/11 09:52:45 [notice] 32589#0: exit  
2011/10/11 09:52:45 [notice] 32591#0: exit  
2011/10/11 09:52:45 [notice] 32593#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 09:52:45 [notice] 32593#0: exiting  
2011/10/11 09:52:45 [notice] 32593#0: exit  
2011/10/11 09:52:45 [notice] 32588#0: signal 17 (SIGCHLD) received  
2011/10/11 09:52:45 [notice] 32588#0: worker process 32591 exited with  
code 0  
2011/10/11 09:52:45 [notice] 32588#0: signal 29 (SIGIO) received  
2011/10/11 09:52:45 [notice] 32592#0: signal 15 (SIGTERM) received,  
exiting  
2011/10/11 09:52:45 [notice] 32592#0: exiting  
2011/10/11 09:52:45 [notice] 32588#0: signal 17 (SIGCHLD) received  
2011/10/11 09:52:45 [notice] 32588#0: worker process 32589 exited with  
code 0  
2011/10/11 09:52:45 [notice] 32588#0: signal 29 (SIGIO) received  
2011/10/11 09:52:45 [notice] 32588#0: signal 17 (SIGCHLD) received  
2011/10/11 09:52:45 [notice] 32592#0: exit  
2011/10/11 09:52:45 [notice] 32588#0: worker process 32593 exited with  
code 0  
2011/10/11 09:52:45 [notice] 32588#0: signal 29 (SIGIO) received  
2011/10/11 09:52:45 [notice] 32588#0: signal 17 (SIGCHLD) received  
2011/10/11 09:52:45 [notice] 32588#0: worker process 32592 exited with  
code 0  
2011/10/11 09:52:45 [notice] 32588#0: exit  
2011/10/11 09:53:08 [notice] 3282#0: using the “epoll” event method  
2011/10/11 09:53:08 [notice] 3282#0: nginx/1.1.5  
2011/10/11 09:53:08 [notice] 3282#0: built by gcc 3.4.6 20060404 (Red  
Hat 3.4.6-11)  
2011/10/11 09:53:08 [notice] 3282#0: OS: Linux 2.6.18-028stab092.1  
2011/10/11 09:53:08 [notice] 3282#0: getrlimit(RLIMIT\_NOFILE):  
1024:1024  
2011/10/11 09:53:08 [notice] 3283#0: start worker processes  
2011/10/11 09:53:08 [notice] 3283#0: start worker process 3284  
2011/10/11 09:53:08 [notice] 3283#0: start worker process 3285  
2011/10/11 09:53:08 [notice] 3283#0: start worker process 3286  
2011/10/11 09:53:08 [notice] 3283#0: start worker process 3288

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,216416,216489#msg-216489](http://forum.nginx.org/read.php?2,216416,216489#msg-216489)

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 16, 2011, 10:50pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/14 "2011-10-16T22:50:23Z")

</div>

Hello!

On Sun, Oct 16, 2011 at 04:33:41PM -0400, codetr wrote:

> hey pls change topic subject nginx crash every night pls help me

As you were already told, from the information you’ve provided  
it’s clear that there is no nginx crash. Instead, something on  
your system kills it.

It’s mostly pointless to ask here for further help - it’s up to  
you to investigate your system to find out problematic script.

Maxim D.

---

<div class="post-metadata">

**Author:** ![codetr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@codetr](https://www.ruby-forum.com/u/codetr)\
**Post date:** [October 16, 2011, 10:34pm UTC](https://www.ruby-forum.com/t/upstream-sent-too-many-data-while-reading/212641/15 "2011-10-16T22:34:18Z")

</div>

hey pls change topic subject nginx crash every night pls help me

Posted at Nginx Forum:

> **[Re: upstream sent too many data while reading](https://forum.nginx.org/read.php?2,216416,216792#msg-216792)**
>
> hi; I use 1.1.5 my error.log upstream sent too many data while reading upstream how to fix it ..
