Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29255

How to close boto3 ec2 connections explicitly, boto3?

$
0
0

I am making an ec2 connection using boto3. I have a a lot of long running connections and most of them are going in CLOSE_WAIT state. I know after some time EC2 will close the connection at its end. Due to which connections at my end will go in 'CLOSE_WAIT' state, which will have open files i.e file descriptor. Now if the process is long running and making a lot of connections, then at one point of time it will throw 'Cannot make new connection Too many open files'. I don't want to increase the number of open file limit as it would be a temporary solution.

Is there a way by which we can close ec2 connections explicitly from boto3?


Viewing all articles
Browse latest Browse all 29255

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>