-
Notifications
You must be signed in to change notification settings - Fork 665
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
Performance issue 100% CPU with Node 12.8.0 (OpenSSL 1.1.1c) on MacOS #821
Comments
As indicated in the linked node core issue, there's not much we can do until an async interface is exposed by node core. |
I was going to come in an open a potential feature/change request related to this same issue. It may be worth considering upping the default We were ourselves introduced to this issue when updating AWS Lambda runtime environments. It took us a little digging (including fruitless efforts at networking tracing / debugging) until finally hitting on the above linked Node.Js issue report. We bumped our timeout and things started working again :) I would agree on the last comment that this is out of control of library maintainers to fix the root issue, but it could be pretty easy to help mitigate the problem. |
Perhaps someone could test with node v13.9.0+ and latest version of |
I have had no issue running locally in node 13.9, but probably not apple-to-apples comparison to the Lambda (Node 12) environment where I have just run into this problem. I should also note that since my first comment two days ago, I have seen this happen in other Lambda function where SSH is being used, so perhaps the AWS runtime recently took on this openssl update and this might be something encountered more frequently. |
Right, I'm not expecting anyone to use a non-LTS node branch in production. I was mostly just looking to confirm that using curve25519 would solve the CPU usage issue since most (OpenSSH) servers support curve25519. node v14 will be out soon, but I'm not sure how quickly Amazon makes newer node LTS branches available on Lambda. |
I have the same issue, using tunnel-ssh library to forward multiple ports of a remote server in order to connect to a database using sequelize. The process runs at 100% of CPU when connecting through SSH, and so it is blocking all other parallel request. We were using node v12 in dev on MacOS, and even after upgrading to node v14.5 the issue still remains. |
@JeremiFerre can you verify the handshake details (set |
Here are the debug logs when I create the SSH tunnel on node 14 (sorry for all the logs I'm not sure where the handshake is):
|
@JeremiFerre you're using a very outdated version of However in this particular case it probably won't matter much since the server you're connecting to doesn't advertise curve25519 for key exchange, which is odd since curve25519 support has existed in OpenSSH since OpenSSH 6.5. My guess is the server has it explicitly disabled one way or another. So in your particular situation there isn't much that can be done by |
Ok I'll check this out, thank you very much for your quick answers. |
Due to the change in OpenSSL Implementation
openssl/openssl@2500c09
The usage of crypto algorithms causing 100% CPU usage in certain scenarios (like building ssh tunnels).
It seems it impacts in MacOS when ssh tunnel is build (reproduce using tunnel-ssh module).
Also reproduced using latest version "ssh2": "^0.8.5".
#816 nodejs/node#28404
The text was updated successfully, but these errors were encountered: