Open joosangkim opened 2 years ago
Hi joosangkim@,
How many open connections did you have on your EC2 instance when you experienced this error? We can start from there to see whether any of the open connections were not in use and should be recycled.
Setting the open file limits in /etc/security/limits.conf
won't work for your case. /etc/security/limits.conf
is a configuration file for Linux PAM authentication. It sets limits for logged in users, not system processes. The ssm-user is a system-generated user that lets you use Session Manager as an administrative tool to manage your instance; it is not used as a login tool to establish SSH connection, as mentioned in this documentation https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html
That being said, if all of the open connections are needed and if you do want to apply the open file limits, you would need to apply it on amazon-ssm-agent service directly and reload all the daemon threads, followed by restarting amazon-ssm-agent, in order to apply the limits from /etc/security/limits.conf
.
Please let us know if this answers your question.
Thanks, Yuting
Hi, I'm trying to create connection between circleci and ec2 via aws ssm session worker. The application on circleci machine generated 50 grpc connection in its connection pool. Also EC2 machine with c5.xlarge spec.
I made a ssm session with below command.
Session manager log from circleci
ssm-seesion-worker logs from EC2 were repeated.
I already increased fd limit for ssm-session-worker in ec2 to its max.