# (no subject)

**URL:** <https://www.ruby-forum.com/t/no-subject/214915>\
**Category:** NGINX\
**Created:** [December 15, 2011, 7:23pm UTC](https://www.ruby-forum.com/t/no-subject/214915 "2011-12-15T19:23:47Z")\
**Posts on this page:** 4\
**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:** [December 15, 2011, 7:23pm UTC](https://www.ruby-forum.com/t/no-subject/214915/1 "2011-12-15T19:23:47Z")

</div>

People,

We are trying to use nginx as a load-balancer for our webservers, but it  
seems that we have problems with some kind of nginx buffering.

Let me describe our situation, we receive from nginx a request, we write  
on  
the socket without closing the connection, but nginx did not response to  
the client until we close the connection!.

Directives already tried:

- keepalive\_timeout 0;
- proxy\_buffering off;

There is something left to try?

thanks

---

<div class="post-metadata">

**Author:** ![SSAlexis\_RodrS\_guez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@SSAlexis\_RodrS\_guez](https://www.ruby-forum.com/u/SSAlexis_RodrS_guez)\
**Post date:** [December 15, 2011, 11:45pm UTC](https://www.ruby-forum.com/t/no-subject/214915/2 "2011-12-15T23:45:30Z")

</div>

On Thu, Dec 15, 2011 at 04:23:07PM -0200, Alexis Rodrguez wrote:

Hi there,

> Let me describe our situation, we receive from nginx a request, we write on  
> the socket without closing the connection, but nginx did not response to  
> the client until we close the connection!.

In testing here, I “proxy\_pass” to the upstream, and “proxy\_buffering  
off”  
causes the http response body to be sent to the client as it is  
generated.

Nothing is sent to the client until after the http response headers  
are complete.

(The test upstream is a simple HTTP/1.0 server running a shell-cgi  
script where I can put “sleep 3” in between “echo output” lines, so I  
know exactly when things are sent by the upstream.)

> Directives already tried:
> 
> - keepalive\_timeout 0;
> - proxy\_buffering off;
> 
> There is something left to try?

Does the simple test above work for you?

How is nginx configured to connect to your web servers? How do your web  
servers respond?

Good luck with it,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![SSAlexis\_RodrS\_guez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@SSAlexis\_RodrS\_guez](https://www.ruby-forum.com/u/SSAlexis_RodrS_guez)\
**Post date:** [December 15, 2011, 11:49pm UTC](https://www.ruby-forum.com/t/no-subject/214915/3 "2011-12-15T23:49:50Z")

</div>

Francis,

Thanks for your response, we solved it using “proxy\_buffering off”!!!

bye

---

<div class="post-metadata">

**Author:** ![SSAlexis\_RodrS\_guez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@SSAlexis\_RodrS\_guez](https://www.ruby-forum.com/u/SSAlexis_RodrS_guez)\
**Post date:** [December 16, 2011, 12:43am UTC](https://www.ruby-forum.com/t/no-subject/214915/4 "2011-12-16T00:43:24Z")

</div>

On Thu, Dec 15, 2011 at 08:49:20PM -0200, Alexis Rodrguez wrote:

Hi there,

> Thanks for your response, we solved it using “proxy\_buffering off”!!!

Great that you got it solved, and that the list has a record of the  
solution.

Cheers,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
