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: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: rainbows-public@bogomips.org Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id DB1301FEC7 for ; Fri, 4 Jul 2014 15:18:11 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id cc10so12419190wib.3 for ; Fri, 04 Jul 2014 08:18:10 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.189.230 with SMTP id gl6mr3897724wjc.118.1404487090298; Fri, 04 Jul 2014 08:18:10 -0700 (PDT) Sender: damian.janowski@gmail.com Received: by 10.194.239.130 with HTTP; Fri, 4 Jul 2014 08:18:10 -0700 (PDT) Date: Fri, 4 Jul 2014 12:18:10 -0300 X-Google-Sender-Auth: _A-3h6Ehl195MxyulpbCR7yVE6I Message-ID: Subject: Slow response with HTTP 1.1? From: Damian Janowski To: rainbows-public@bogomips.org Content-Type: text/plain; charset=UTF-8 List-Id: 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? $ uname -a Linux ip-10-187-40-71 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux $ ruby -v ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] $ rainbows -v Rainbows! v4.6.2 $ time curl localhost:8080/ping -vv * About to connect() to localhost port 8080 (#0) * Trying ::1... * Connection refused * Trying 127.0.0.1... * connected * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /ping HTTP/1.1 > User-Agent: 'Mozilla/5.0' > Host: localhost:8080 > Accept: */* > * 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 < * additional stuff not fine transfer.c:1037: 0 0 * additional stuff not fine transfer.c:1037: 0 0 * additional stuff not fine transfer.c:1037: 0 0 * additional stuff not fine transfer.c:1037: 0 0 * nread <= 0, server closed connection, bailing * Closing connection #0 PONG real 0m5.015s user 0m0.000s sys 0m0.008s $ time curl localhost:8080/ping -vv -0 * About to connect() to localhost port 8080 (#0) * Trying ::1... * Connection refused * Trying 127.0.0.1... * connected * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /ping HTTP/1.0 > User-Agent: 'Mozilla/5.0' > Host: localhost:8080 > Accept: */* > * HTTP 1.1 or later with persistent connection, pipelining supported < HTTP/1.1 200 OK < Date: Fri, 04 Jul 2014 15:04:48 GMT < Status: 200 OK < Content-Type: text/plain; charset=UTF-8 < Connection: close < * nread <= 0, server closed connection, bailing * Closing connection #0 PONG real 0m0.010s user 0m0.012s sys 0m0.000s