Combating nginx 499 HTTP responses during flash traffic scenario

Tom Burns tom.burns at
Mon Oct 29 22:21:23 UTC 2012

On Mon, Oct 29, 2012 at 5:53 PM, Eric Wong <normalperson at> wrote:
> Maybe this gross hack can work for you guys.  It writes the first
> chunk of the HTTP response header out immediately after reading
> the request headers, and sends the rest once it gets the status...

Eric, thank you very much for your replies.  We'd debated this as an
alternate solution along with the two I mentioned in my original
email, and to be honest your tentative patch is cleaner than I'd had
expected this solution to look like :)

I will test this and respond back.

One of our goals in solving this problem would be to get any changes
merged back into unicorn master, and this looks like it would actually
lead to a cleaner result than having to select() on the socket.

Another side effect of the "select() in a middleware" solution was
going to be removing the NULL_IO optimization that sets rack.input to
a StringIO.


More information about the mongrel-unicorn mailing list