-
Notifications
You must be signed in to change notification settings - Fork 11
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
em-ssh-shell fails to start shell without error #5
Comments
Can you post some example code please? Sent from my iPhone On 2012/04/24, at 19:18, Mark [email protected] wrote:
|
EM.run { EM.error_handler do |e| puts " **** ERROR #{e.message}" puts e.backtrace.join "\n" end started=0 (1..30).each do EM::Ssh::Shell.new("localhost", "emtest", "emdemo") do |shell| started+=1 shell.on(:error) do |e| puts "Shell error :( #{e}" end shell.on(:closed) do |e| puts "Shell close :( #{e}" end end end EventMachine::PeriodicTimer.new(1) do puts "We have #{started} connections" end } On my machine stared goes to 10, but never get any exceptions or errors. |
I found the reason for the 10 limit is the sshd_config default for MaxStartups is 10 |
I'd put my money on this actually being the thread pool in EM (I believe it defaults to 20)... Also, opening 30+ requests is quite inefficient, I'd suggest looking into using EM's work and request pooling: https://github.com/eventmachine/eventmachine/blob/master/lib/em/pool.rb#L9-38 |
root 2106 1 0 Aug13 ? 00:00:28 /usr/sbin/sshd I was incorrect. Tested the pool, not the case. It's the max_startups as described above. However, this still should be handled in a work queue, 10 simultaneous connections is plenty. |
Folks, do you still see this issue? |
Not sure whats happening yet, but my block inside EM::Ssh::Shell.new never gets evaluated, and no errors are raised
I can simulate this easily by connecting 50 times concurrently
The text was updated successfully, but these errors were encountered: