Consul agent report for Consul server that service discovery with output: too open many file
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Hi all.
My model deploy:

I use the components:
- Consul with version 1.6.0.
- Service is implemented by Java.
- Consul client Vertx in [here](https://vertx.io/docs/vertx-consul-client/java/).
- Health check service by TCP in [here](https://www.consul.io/docs/discovery/checks).
When I run my service for a short time, the Consul server reports my service is unhealthy. I see report health check on the UI and find consul report that service discovery with output: **too open many file**. Then I check the open socket on the server A that have many TCP connections and it increases continuously.
When I stop my service, I check the TCP connection on servers, it is closed.
I try to increase **ulimit -s** value of server, but the above issue does not resolve. Then I also try set config [tcpKeepAlive](https://vertx.io/docs/apidocs/io/vertx/ext/web/client/WebClientOptions.html#setTcpKeepAlive-boolean-) of Consul client Vertx, but it does not help resolve issue. I don't know that I used the wrong configuration of Consul or not?
I think that the consul agent should use one TCP connection and keep alive it to health check the service or it closes the TCP connection after checking the service.
Contributor guide
Assessment
This issue has not been assessed yet.