Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Eric Wong wrote: > ECONNRESET is harmless in this case (unless nginx started pipelining or > blindly attempting persistent connections to unicorn, which it should > not be doing since unicorn sends "Connection: close" on every response) Actually, are you getting 502 errors returned from nginx in

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Michael Fischer wrote: > On Tue, Mar 24, 2015 at 11:23 PM, Eric Wong wrote: > > > So there might be data sitting on the socket if your application > > processing returns a response before it parsed the POST request. > > When this occurs, the nginx access logs show an HTTP 200 (OK) response > wi

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Michael Fischer
On Tue, Mar 24, 2015 at 11:23 PM, Eric Wong wrote: > So there might be data sitting on the socket if your application > processing returns a response before it parsed the POST request. When this occurs, the nginx access logs show an HTTP 200 (OK) response with a 0 byte response body. Is it your

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Michael Fischer wrote: > On Tue, Mar 24, 2015 at 10:59 PM, Eric Wong wrote: > > Another likely explanation might be you're not draining rack.input every > > request, since unicorn does lazy reads off the socket to prevent > > rejected uploads from wasting disk I/O[1] > > > > So you can send a big

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Michael Fischer
On Tue, Mar 24, 2015 at 10:59 PM, Eric Wong wrote: > Another likely explanation might be you're not draining rack.input every > request, since unicorn does lazy reads off the socket to prevent > rejected uploads from wasting disk I/O[1] > > So you can send a bigger POST request with my example to

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Michael Fischer
On Tue, Mar 24, 2015 at 10:54 PM, Eric Wong wrote: > Michael Fischer wrote: >> We have an nginx 1.6.2 proxy in front of a Unicorn 4.8.3 server that >> is frequently reporting the following error: >> >> 2015/03/24 01:46:01 [error] 11217#0: *872231 readv() failed (104: >> Connection reset by peer)

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Another likely explanation might be you're not draining rack.input every request, since unicorn does lazy reads off the socket to prevent rejected uploads from wasting disk I/O[1] So you can send a bigger POST request with my example to maybe reproduce the issue. [1] you can use the Unicorn::Prer

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Michael Fischer wrote: > We have an nginx 1.6.2 proxy in front of a Unicorn 4.8.3 server that > is frequently reporting the following error: > > 2015/03/24 01:46:01 [error] 11217#0: *872231 readv() failed (104: > Connection reset by peer) while reading upstream > > The interesting things are: >

Re: Is it possible to create a thread in Rails subscribe to Redis message channel?

2015-03-24 Thread Eric Wong
胡明 wrote: > I am trying to create a thread in Rails to subscribe a message channel of > Redis. Is there a way to do this? I am using unicorn. Theoretically, yes, similar things are done with other services. > But it will make the unicorn server unable to handle any web request. I > thought tha

nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Michael Fischer
We have an nginx 1.6.2 proxy in front of a Unicorn 4.8.3 server that is frequently reporting the following error: 2015/03/24 01:46:01 [error] 11217#0: *872231 readv() failed (104: Connection reset by peer) while reading upstream The interesting things are: 1) The upstream is a Unix domain socket

Is it possible to create a thread in Rails subscribe to Redis message channel?

2015-03-24 Thread 胡明
Hi there I have one question about related to thread in Unicorn; I have asked the quesiton on stackoverflow.com but no one answers: http://stackoverflow.com/questions/29180275/is-it-possible-to-create-a-thread-in-rails-subscribe-to-redis-message-channel I also pasted the question in this email,