Skip to content

connection pool tries to reuse closed connections #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hsenag opened this issue Oct 6, 2011 · 3 comments
Closed

connection pool tries to reuse closed connections #14

hsenag opened this issue Oct 6, 2011 · 3 comments

Comments

@hsenag
Copy link
Member

hsenag commented Oct 6, 2011

If a webserver doesn't implement keep-alive (e.g. httpd-shed as currently used in the test harness), HTTP doesn't notice and still tries to send a second request on the same connection.

@dcoutts
Copy link
Contributor

dcoutts commented Sep 28, 2012

I'm getting a similar error, but instead of throwing ErrorReset or ErrorClosed, we just get the underlying socket error.

The client has sent a PUT request to the server. Here's the client log from the point where we get the response, and then try to send the next PUT request:

Debug: Received:
HTTP/1.1 204 No Content 
Connection: close
Content-Type: text/plain
Date: Fri, 28 Sep 2012 15:59:57 GMT
Server: Happstack/7.0.4

Debug: Sending:
PUT /user/foobar HTTP/1.1
Host: localhost:8080
User-Agent: hackage-import/0.2
Content-Length: 13
Content-Type: text/plain

Debug: Recovering connection to admin:admin@localhost:8080
hackage-import: <socket: 4>: resource vanished

The important thing to notice here is that the server is responding with Connection: close (and presumably then does actually close the socket).

@dcoutts
Copy link
Contributor

dcoutts commented Sep 28, 2012

BTW, that's with HTTP-4000.2.5

@statusfailed
Copy link

This issue also seems to be the cause of bug in cabal-install which crashes (for me) when using a proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants