Skip to content
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

Why does this warning message pop up? #20

Closed
simendsjo opened this issue Apr 28, 2012 · 6 comments
Closed

Why does this warning message pop up? #20

simendsjo opened this issue Apr 28, 2012 · 6 comments
Milestone

Comments

@simendsjo
Copy link
Contributor

When a connection hasn't been used in a while, this message appears:
[7F3C31AC6F00:7F3C31ACAC80 WRN] Handling of connection failed: Operating on closed TCPConnection.

Is this really a warning? What is vibe trying to do here?

@s-ludwig
Copy link
Member

It's an exception that is thrown because the connection timed out on a keep-alive connection. Whats missing is that the HTTP server sends a proper timeout and closes the connection after this timeout proactively instead of passively through the TCP read timeout. j-krueger is already on this.

@ghost ghost assigned j-krueger Apr 28, 2012
s-ludwig added a commit that referenced this issue May 20, 2012
Fixed the return value of Libevent2TcpConnection.waitForData.
The HTTP server checks for client disconnects before reading a consecutive request of a keep-alive connection now (avoids "operating on closed connection" errors).
Fixes issues #20 and possibly #43.
@jkm
Copy link
Contributor

jkm commented Feb 17, 2013

I still have this issue with latest vibed v0.7.12 (BTW you should update VibeVersionString).
I am executing
$ ../bin/vibe -v
inside benchmark and executing
$ ab -r -n 100000 -c 1000 http://127.0.0.1:8080/static/1k

Lot's of "Handling of connection failed: Operating on closed TCPConnection" are generating.

@s-ludwig
Copy link
Member

I still didn't find the root cause for this message in conjunction with ab -c 1000. Something seems to overflow and cause the connection to be aborted prematurely. It needs some more low level investigation, though (which is hard because of the sheer amount of data that is generated). But at least it's a different issue than the original one here, just with the same warning.

Thanks for the version hint.. I completely missed that for this release.

@johnknott
Copy link

I start getting these "Handling of connection failed: Operating on closed TCPConnection." messages with a concurrency as low as 4 when testing with ab. Generally only 1 out of the 10,000 though.

I can understand how these issues would be hard to track down. Loving Vibe BTW. :)

ab -n 10000 -c 4 http://localhost:8080/ = ~ 1 message
ab -n 10000 -c 10 http://localhost:8080/ = ~ 4 messages
ab -n 10000 -c 100 http://localhost:8080/ = ~ 60 messages

@mihails-strasuns
Copy link
Contributor

Interesting. I remember those but after fix was commited, have never reproduced ones, even on "-c 5000" (Have been doing perf tests recently).

@johnknott
Copy link

Right, I installed Vibe from GitHub this time and ran the same tests and it worked flawlessly.

Previously I had used 'dub' and specified "vibe-d": ">=0.7.14" as a dependency in the packages.json.

So it was my fault for not getting the latest code. Thanks!

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

6 participants