This week I noticed that Mongrel2's python library doesn't issue close 
messages by default. Of course this is to ensure streaming works, but for some 
reason I figured if Content-Length was passed and enough content sent, then 
either the python library would send a close message or Mongrel2 would 
automatically close the connection but it turns out that neither of these 
things actually happen.

Curl and pretty much every browser seems to receive HTTP responses just fine 
with this behavior. But some other clients are pickier, and need the explicit 
close (like Pingdom for example). I'm not sure what the right server behavior 
is, but I've started issuing explicit close messages from my handlers when my 
intention is that the HTTP response is complete.

I don't know if this is the issue you're seeing, but I'm mentioning it just in 
case.

On Thursday, May 17, 2012 11:49:00 AM Alberto Salce wrote:
> Could this be related to why ApacheBenchmark and Mongrel2 don't get
> along. AB just hangs like if the connections are not being accepted.
> Siege works just fine.
> 
> On 5/17/2012 12:14 PM, Rob LaRubbio wrote:
> > I'm trying to write a filter that I can use to track how long requests
> > are taking to run through my system.  The filter is pretty simple, it
> > just intercepts the REQ_RECV and RESP_SENT states, tracks the time of
> > each and prints it.
> > 
> > When I run my filter and access my server with a browser I see both
> > states execute and the filter correctly prints the time.  However if I
> > access my server using curl on the command line I only see REQ_RECV.  I
> > do see the response from my service in the terminal and the curl command
> > returns.  I've also tried different combination of states with HANDLER&
> > CLOSED but I still see the same results.  I'm a little stumped by this
> > so any suggestions on where to look next would be really helpful.
> > 
> > -Rob

Reply via email to