Hi, @ankurpatel.
This exception is being thrown from the .NET networking stack and is not a client issue. I've personally never hit this, but it's typically thrown if your device runs out of ephemeral ports and is, therefore, unable to select a port for the new connection.
Are you reusing the same ElasticClient instance across your application? If you're using DI, it should be registered as a singleton lifetime. By reusing the same instance, the underlying HTTP connections are reused, which is essential. Otherwise, many instances can lead to short-lived connections and ports being tied up.
If you are using HttpClient elsewhere in your application, the same rule applies, and you should reuse the same instance to avoid socket exhaustion.
I have a couple of blog posts on this subject which could help: