a growing number of connections
I am maintaining a c++11 application with Ice 3.7.3 version on linux. It is a service for caching a database. It continiously makes requests to remote DB and stores it in memory. There is another proxy service between this one and the database which makes connection and sends requests to DB. Ice is between these two services. I use tcp to connect them. For some scale reasons I decided to put the proxy service into several docker containers and balance requests between them by haproxy (roundrobin algorythm). But when I tried it (1 cache to 2 proxies) my service started to produce a lot of connections to proxy services. The connections are being established successfully but the amount of it keeps growng with every request and the work is spoiled. There was no problem with this when I tried to connect to only one proxy service and there was no problem when I set the ip/port of proxy as an endpoint in my config directly. The containers with proxies have the same ip/port to have an ability to balance requests. So if I set this one in the config, I have this issue. Also I've tried to play with timeouts and it didn't help. I'm sure that the reconnections appear much more often then it may become old (many times per second). I don't see the huge amount of connections in haproxy. So it looks like I have something wrong in my ice part which I don't understand well enough. I'm not sure if something rips up the connection because I see no exceptions telling about it.