Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 48482 invoked from network); 16 Sep 2009 01:34:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Sep 2009 01:34:32 -0000 Received: (qmail 43633 invoked by uid 500); 16 Sep 2009 01:34:31 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 43546 invoked by uid 500); 16 Sep 2009 01:34:31 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 43536 invoked by uid 99); 16 Sep 2009 01:34:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 01:34:30 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 01:34:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 71F6B234C044 for ; Tue, 15 Sep 2009 18:33:57 -0700 (PDT) Message-ID: <1461047052.1253064837451.JavaMail.jira@brutus> Date: Tue, 15 Sep 2009 18:33:57 -0700 (PDT) From: "Bob Dionne (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-504) HTTP/1.1 keep alive fails with AB In-Reply-To: <1869453175.1253044197516.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Dionne updated COUCHDB-504: ------------------------------- Attachment: couch_httpd_hack.patch this patch to send_json puts "Connection : Keep-Alive" into the response header, if it exists in the request. This isn't likely the best solution but it solves the problem and all the tests run. > HTTP/1.1 keep alive fails with AB > --------------------------------- > > Key: COUCHDB-504 > URL: https://issues.apache.org/jira/browse/COUCHDB-504 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 0.10 > Environment: Trunk > Reporter: Paul Joseph Davis > Assignee: Paul Joseph Davis > Priority: Blocker > Attachments: couch_httpd_hack.patch > > > Reported on dev@ > On Tue, Sep 15, 2009 at 3:33 PM, thomas hallaran wrote: > > Hi all, > > We are using couchdb in production and have come across what appears to be a > > bug in the HTTP implementation. Apparently http keep alive requests are not > > correctly supported by couchdb. > > > > This problem has been verified for both couchdb .10 a running on ubuntu > > with erlang 13.b1 and couchdb .91 running on osx. We have also reproduced > > it with multiple http clients, the apache hc java client, curl and ab. > > > > To Reproduce: ab -v 4 -k -n1 > > http://localhost:5984/{COUCHDB_GET_ENDPOINT}times > > out. If you add more requests for ab to do (-n4 or something) you will > > see that rather than reusing the connection, each keepalive request times > > out and then the connection is reopened and the request made. > And I've verified: > $ svn up > #snipped > Updated to revision 815457. > $ ./bootstrap && ./configure && make dev > #snipped > $ ./utils/run > Apache CouchDB 0.11.0a815457 (LogLevel=info) is starting. > Apache CouchDB has started. Time to relax. > # In second terminal > $ curl -X PUT http://127.0.0.1:5984/test_fu > {"ok":true} > $ curl -X PUT -d '{"stuff": "here"}' http://127.0.0.1:5984/test_fu/beer > {"ok":true,"id":"beer","rev":"1-9782357dd8b8d18d94843686e510ec92"} > $ ab -v 4 -k -n1 http://127.0.0.1:5984/test_fu/beer > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > Benchmarking 127.0.0.1 (be patient)...INFO: POST header == > --- > GET /test_fu/beer HTTP/1.0 > Connection: Keep-Alive > Host: 127.0.0.1:5984 > User-Agent: ApacheBench/2.3 > Accept: */* > --- > LOG: header received: > HTTP/1.0 200 OK > Server: CouchDB/0.11.0a815457 (Erlang OTP/R13B) > Etag: "1-9782357dd8b8d18d94843686e510ec92" > Date: Tue, 15 Sep 2009 19:44:36 GMT > Content-Type: text/plain;charset=utf-8 > Content-Length: 74 > Cache-Control: must-revalidate > {"_id":"beer","_rev":"1-9782357dd8b8d18d94843686e510ec92","stuff":"here"} > LOG: Response code = 200 > apr_poll: The timeout specified has expired (70007) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.