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 <[email protected]> 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.