From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-1.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: rainbows-public@bogomips.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2494A1FEC7; Fri, 4 Jul 2014 19:50:33 +0000 (UTC) Date: Fri, 4 Jul 2014 19:50:33 +0000 From: Eric Wong To: Damian Janowski Cc: rainbows-public@bogomips.org Subject: Re: Slow response with HTTP 1.1? Message-ID: <20140704195032.GA13152@dcvr.yhbt.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: Damian Janowski wrote: > Hi, > > I'm seeing very slow (or time outs, depending on the client) for > requests made over HTTP 1.1. If I force curl to use HTTP 1.0, > everything works quickly. > > The behavior is consistent over curl or when using Rainbows behind Varnish. > > Any ideas? > $ time curl localhost:8080/ping -vv > * HTTP 1.1 or later with persistent connection, pipelining supported > < HTTP/1.1 200 OK > < Date: Fri, 04 Jul 2014 15:02:47 GMT > < Status: 200 OK > < Content-Type: text/plain; charset=UTF-8 > < Connection: keep-alive > * no chunk, no close, no size. Assume close to signal end Your app is missing the Rack::ContentLength (and Rack::Chunked) middlewares. This is mentioned at the bottom of the manpage[1], but I suspect it might be necessary to add a FAQ entry. [1] http://rainbows.bogomips.org/rainbows.1.html