-
Notifications
You must be signed in to change notification settings - Fork 94
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
Concurrent requests on same connection? #95
Comments
The package does support concurrent connections but there's usually a limit by the server on how much concurrent requests can be run on a connection. You should not use a for loop to invoke asynchronous methods, you should do them in a pool with a max number or chain-them up or await 1 by 1. That's just my personal opinion. The error seems to be coming from the base library, you could ask the author why this is happening. My rough guess would be rate limiting on the server side. |
Hey, I am having the same issue - it crashes the server even if I catch all errors. Will investigate the issue and report it here if I find how to fix it. |
So for me, increasing significantly the MaxSessions in the sshd_config fixed the issue. When you don't set it with OpenSsh, MaxSessions = 10 |
Thanks for reporting the fix that worked for you @martinlevesque Cheers |
I'm running a for loop which invokes 15+ ssh2 connections.
I run this 15 times in a for loops quickly, creating concurrent ssh requests (or at least trying to create concurrent requests).
await ssh.execCommand(cmd);
I get the following error on all of the connections except the first one:
This leads me to understand that this package does not support concurrent requests on the same connection? I'm guessing I must open a new connection per request?
The text was updated successfully, but these errors were encountered: