couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <kocol...@apache.org>
Subject Re: [jira] Commented: (COUCHDB-504) HTTP/1.1 keep alive fails with AB
Date Wed, 16 Sep 2009 01:22:41 GMT
Heh, I stand corrected.  +1 on the path forward.  I guess its just a  
matter of adding Connection: Keep-Alive to the response headers.

Adam

On Sep 15, 2009, at 6:52 PM, Paul Davis wrote:

> Both MochiWeb and http://www.io.com/~maus/HttpKeepAlive.html think
> there is Keep-Alive in HTTP/1.0. And I'm guessing a great many clients
> do as well. Granted its by convention and not part of the spec, do we
> kill the possibility or adhere to convention.
>
> Seeing as Mochiweb already tries I would say we should patch Mochiweb
> to support it.
>
> Sent to your iPhone
>
> On Tue, Sep 15, 2009 at 6:22 PM, Adam Kocoloski
> <adam.kocoloski@gmail.com> wrote:
>> There's no keep-alive in HTTP/1.0 ...
>>
>> Sent from my iPhone
>>
>> On Sep 15, 2009, at 6:11 PM, "Paul Joseph Davis (JIRA)" <jira@apache.org 
>> >
>> wrote:
>>
>>>
>>>   [
>>> https://issues.apache.org/jira/browse/COUCHDB-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755734#action_12755734

>>>  ]
>>>
>>> Paul Joseph Davis commented on COUCHDB-504:
>>> -------------------------------------------
>>>
>>> http://code.google.com/p/couchdb-python/issues/detail?id=85
>>>
>>> Looks like this could be related.
>>>
>>>> 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
>>>>
>>>> Reported on dev@
>>>> On Tue, Sep 15, 2009 at 3:33 PM, thomas hallaran <thallaran@gmail.com

>>>> >
>>>> 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}<http://localhost:5984/%7BCOUCHDB_GET_ENDPOINT%7D

>>>>> >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.
>>>
>>


Mime
View raw message