On Friday 26 May 2006 10:55 am, Peter C. Verhage wrote:
Kirk H. wrote:
Mongrel is not single threaded, but the Rails handler is because Rails is
But doesn’t this then mean Mongrel is only capable of handling one Rails
request at at time? I just checked btw, when I use webrick I’m facing
the same problem.
Maybe I am splitting hairs here, but Mongrel itself can handle X numbers
requests at the same time. Rails can not. The Rails handler for
synchronizes requests to Rails. So yes, the net effect is that while
multiple requests can be recevied by the Mongrel/Rails process
simultaneously, they are handled in serial fashion, which results in a
deadlock when one request initiates a subrequest to the same server. It
Rails issue, though, not a Mongrel one, to be specfic, and one that, I
guess, doesn’t come up too often since most people aren’t making
to the same server in their request handling.
To work around it, you either need to have an architecture where you
multiple mongrel/rails backend processes that requests get distributed
someone needs to write something like an SCGI handler for mongrel to let
single mongrel webserver communicate with multiple Rails backends.
have any other ideas?