unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* IOError: closed stream
@ 2013-09-24 16:02 David Judd
  2013-09-24 17:39 ` Eric Wong
  2013-09-26 22:31 ` David Judd
  0 siblings, 2 replies; 3+ messages in thread
From: David Judd @ 2013-09-24 16:02 UTC (permalink / raw)
  To: mongrel-unicorn

I'm getting "IOError: closed stream" from inside Unicorn occasionally
and I don't know what to make of it. The stack trace looks like this:

unicorn (4.5.0) lib/unicorn/stream_input.rb:129:in `kgio_read' unicorn
(4.5.0) lib/unicorn/stream_input.rb:129:in `read_all' unicorn (4.5.0)
lib/unicorn/stream_input.rb:60:in `read' unicorn (4.5.0)
lib/unicorn/tee_input.rb:84:in `read'
config/initializers/rack_request.rb:19:in `POST' rack (1.4.5)
lib/rack/request.rb:221:in `params'

Any suggestions what this might indicate? Is this what I should
legitimately expect to see if the browser closes the connection
abruptly?

It's happening only for POSTs, and a small percentage of them, but I
can't find any further pattern - a variety of content, usually quite
small content-lengths.

Currently we're running nginx in front of unicorn via a unix socket.
In this state the errors occur at an almost-negligible rate. I
experimented yesterday with moving instead to nginx in front of
varnish, on a separate machine, with varnish then talking to unicorn
via a TCP socket. In that configuration the errors increased
dramatically, although the majority of requests still succeeded.

As you can see we're running unicorn 4.5 and rack 1.4.5 - except that
I'm monkey-patching Rack::Request to backport the 1.5 POST method,
which transforms an earlier nil error in to this one. (On Ruby 2.0.0,
on an Ubuntu-precise box on AWS.)

Any relevant info or suggestions would be appreciated.

Apologies if this shows up as a double-post--my first attempt seems to
have been rejected because I didn't turn on plain text mode.

Thanks,
David
_______________________________________________
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-26 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-24 16:02 IOError: closed stream David Judd
2013-09-24 17:39 ` Eric Wong
2013-09-26 22:31 ` David Judd

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).