# Random Internal Server Error

**URL:** <https://www.ruby-forum.com/t/random-internal-server-error/226533>\
**Category:** NGINX\
**Created:** [December 12, 2012, 11:49pm UTC](https://www.ruby-forum.com/t/random-internal-server-error/226533 "2012-12-12T23:49:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattphi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@mattphi](https://www.ruby-forum.com/u/mattphi)\
**Post date:** [December 12, 2012, 11:49pm UTC](https://www.ruby-forum.com/t/random-internal-server-error/226533/1 "2012-12-12T23:49:38Z")

</div>

Hi,

I’m having trouble with my nginx showing totally random Internal Server  
Error.

I’m running gunicorn with nginx as a reverse proxy. My error log (info)  
shows:

“upstream sent too much data while reading upstream” and client x.x.x.x  
closed keepalive connection

nginx version: 1.2.4

Any help would be appreciated!

thanks

Posted at Nginx Forum:

> **[Random Internal Server Error](https://forum.nginx.org/read.php?2,233947,233947#msg-233947)**
>
> Hi, I'm having trouble with my nginx showing totally random Internal Server Error. I'm running gunicorn with nginx as a reverse proxy. My error log (info) shows: "upstream sent too much data while reading upstream" and client x.x.x.x closed...

---

<div class="post-metadata">

**Author:** ![mattphi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@mattphi](https://www.ruby-forum.com/u/mattphi)\
**Post date:** [December 13, 2012, 11:58am UTC](https://www.ruby-forum.com/t/random-internal-server-error/226533/2 "2012-12-13T11:58:50Z")

</div>

Hello!

On Wed, Dec 12, 2012 at 05:49:11PM -0500, mattphi wrote:

> nginx version: 1.2.4
> 
> Any help would be appreciated!

The “upstream sent too much data” error means your upstream  
(backend) server returned incorrect response, with Content-Length  
not matching the content returned. This indicate something wrong  
happens on your backend, either in your code or in the  
framework/backend server you use, and might result in undefined  
behaviour.

–  
Maxim D.

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.

---

<div class="post-metadata">

**Author:** ![mattphi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@mattphi](https://www.ruby-forum.com/u/mattphi)\
**Post date:** [December 13, 2012, 12:44pm UTC](https://www.ruby-forum.com/t/random-internal-server-error/226533/3 "2012-12-13T12:44:59Z")

</div>

Hey Maxim!

Yes, indeed. After more in depth debugging on the backend side, it was  
caused by misplaced imports.

Thanks!

## Maxim D. Wrote:

> > I’m running gunicorn with nginx as a reverse proxy. My error log
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

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