Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: synchronous controllers taking 6 seconds in Eventmachine config
       [not found]     ` <2B157204-E5C6-4F5D-98A9-E2A79F9F9765-Nf+wZpSdgweeYOMve9Zru9BPR1lH4CV8@public.gmane.org>
@ 2010-09-15 18:50  4%   ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2010-09-15 18:50 UTC (permalink / raw)
  To: Rainbows! list

Christoph Sturm <me-Nf+wZpSdgweeYOMve9Zru9BPR1lH4CV8@public.gmane.org> wrote:
> hello rainbows friends!
> 
> we use rainbows in eventmachine mode, and it seems there's a bug in
> handling of synchronous responses.
> 
> this controller takes 6 seconds:
> 
> def call(env)
>       Rack::Response.new.finish
> end
> 
> this only occurs when i dont set a content length, for example this
> controller returns immedately:
> 
> def call
>    [200, {'Content-Length' => 2}, ['OK']]
> end
> 
> it also doesnt seem to be eventmachine specific, if i remove the use
> :Eventmachine it also happens.

Hi Chris, this is because the client doesn't know when to stop
reading the connection otherwise, and waits until the keepalive
timeout (5 seconds or so by default).

"Content-Length" (or "Transfer-Encoding") is required by the Rack spec,
so you need to include it in your app (or use
Rack::ContentLength and/or Rack::Chunked middlewares).

Starting with Rainbows! 0.97.0, you can set "keepalive_timeout 0" in
your Rainbows! config block to disable keepalive across all concurrency
models, which lets you violate the Rack spec and get immediate
responses.

-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 4%]

* [ANN] Rainbows! 0.97.0
@ 2010-08-28 20:06  7% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2010-08-28 20:06 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

Changes:

We now depend on Unicorn 1.1.3 to avoid race conditions during
log cycling.  This bug mainly affected folks using Rainbows! as
a multithreaded static file server.

"keepalive_timeout 0" now works as documented for all backends
to completely disable keepalive.  This was previously broken
under EventMachine, Rev, and Revactor.

There is a new Rainbows::ThreadTimeout Rack middleware which
gives soft timeouts to apps running on multithreaded backends.

There are several bugfixes for proxying IO objects and the usual
round of small code cleanups and documentation updates.

See the commits in git for all the details.

* http://rainbows.rubyforge.org/
* rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
* git://git.bogomips.org/rainbows.git

-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 7%]

Results 1-2 of 2 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2010-08-28 20:06  7% [ANN] Rainbows! 0.97.0 Eric Wong
2010-09-15 13:46     synchronous controllers taking 6 seconds in Eventmachine config Christoph Sturm
     [not found]     ` <2B157204-E5C6-4F5D-98A9-E2A79F9F9765-Nf+wZpSdgweeYOMve9Zru9BPR1lH4CV8@public.gmane.org>
2010-09-15 18:50  4%   ` Eric Wong

Code repositories for project(s) associated with this inbox:

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