unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: mongrel-unicorn@rubyforge.org
Cc: Alexey Bondar <alexey.bondar@gmail.com>
Subject: Re: "Read error: #<IOError: closed stream>" and uploads
Date: Mon, 24 Jan 2011 19:17:57 -0800	[thread overview]
Message-ID: <20110125031757.GA6871@dcvr.yhbt.net> (raw)
In-Reply-To: <C83FE4C4-F4FB-48BC-8FC6-4E1B1B26F2D8@gmail.com>

Alexey Bondar <alexey.bondar@gmail.com> wrote:
> On Jan 25, 2011, at 03:51 , Eric Wong wrote:
> > Wait, nginx buffered the body to disk when client_body_buffer_size is
> > 128mb and you have trouble with a 150kb request?
> 
> Oops, my fault: not body_buffer_size, but client_max_body_size.  client_body_buffer_size is 128k.
> 
> As I understand, in this case nginx should buffer whole request body, before sending to backend? 

Yes, nginx always buffers the whole request body

> >> Same issue with 1.1.x
> > 
> > OK.  Which timeout exactly are you hitting in nginx?  
> 
> Logs: 
> 2011/01/23 21:09:05 [warn] 79095#0: *261 a client request body is buffered to a temporary file /var/spool/nginx-client-body/3/00/0000000003

<snip>

> 2011/01/23 21:09:35 [error] 79095#0: *261 upstream timed out (60: Operation timed out) while sending request to upstream

<snip>

Very strange.  Do you process env["rack.input"] directly from your app
or do you let Rails/Rack handle everything?

This probably won't help, but can you try increasing the
proxy_send_timeout in nginx?  What's your Unicorn timeout?

_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


  parent reply	other threads:[~2011-01-25  4:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-23 21:28 "Read error: #<IOError: closed stream>" and uploads Alexey Bondar
2011-01-24  0:59 ` Eric Wong
     [not found]   ` <20110124181919.GA24783@dcvr.yhbt.net>
     [not found]     ` <BE4CE2A9-B804-4EFE-9F68-8E8253B4B82D@gmail.com>
2011-01-25  0:51       ` Eric Wong
     [not found]         ` <C83FE4C4-F4FB-48BC-8FC6-4E1B1B26F2D8@gmail.com>
2011-01-25  3:17           ` Eric Wong [this message]
     [not found]             ` <25C1DE1D-59D2-4E80-92E6-FDC0897814BA@gmail.com>
2011-01-25  3:53               ` Eric Wong
     [not found]                 ` <41BA1BA1-3DB7-45C2-8503-17026080D04A@gmail.com>
2011-01-25  4:10                   ` Eric Wong
     [not found]                     ` <C5FE59F4-1083-4E89-BAD3-970CF0BCB745@gmail.com>
2011-01-25  4:54                       ` Eric Wong
     [not found]                         ` <5F765353-9348-4264-84FE-B639FB198868@gmail.com>
2011-01-25 21:33                           ` [PATCH] KNOWN_ISSUES: FreeBSD 8 and sendfile can be buggy Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110125031757.GA6871@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=alexey.bondar@gmail.com \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).