-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
after doesn't fire / sockets disappear #114
Comments
Can you post the JMeter scenario you used? I'm thinking this might have something to do with the connection backlog but being able to repro your problem would be the best way to determine that. What Ruby VM are you using? Can you try it on JRuby and take a thread dump? |
Not sure how to attach files here...
|
I'd also like to note that this exact test plan works fine with this node.js code:
which means that test plan is good |
and |
@bornmw I'll take a look when I get a chance |
with JRuby 476 connections don't get closed
Thread dump:
|
Smells like a very nice deadlock :) |
Is this not solved by increasing the backlog to the number of connections you intend to have hitting the server at the same time? |
Also note, this is probably an issue that should go here: https://github.com/celluloid/celluloid-io/issues I can move it over if you'd like |
Same problem for me, seems that read_block is taking forever. |
Yup I'm building a Redis Adapter for JRuby on both mri and jruby when we lock ownership or wait_readable it wait forever. Here my workaround: def read_sock(length=Socket::SO_RCVBUF)
retries = 0
connection.acquire_ownership :r
begin
sock.read_nonblock(length)
rescue Errno::EAGAIN
# If I use here connection.wait_readable it loop forever
if (retries+=1) < RETRIES
sleep 0.01
retry
else
abort Redis::TimeoutError.new
end
end
rescue EOFError
abort Redis::TimeoutError.new
ensure
connection.release_ownership :r
end |
Moving this issue to the Celluloid::IO project: |
I believe this may be fixed now. Can you try to reproduce? |
My primitive app accepts a connection and closes it after 10 seconds.
I'm using jMeter to open 2000 connections.
Only about 1800 of them get a reply and get actually closed.
200 connections keep waiting forever.
The text was updated successfully, but these errors were encountered: