We use Aerospike Comminity Edition v3.4.1 on two nodes. The two nodes have about 1200-1300 client connections. We only write using the async put method to the server from 3 Java servers. Is it normal, that there is 1200+ network connections to one server?
and the counter is increasing. Now it is about 2100.
The default value for asyncMaxCommands is 300. This determines how many asynchronous commands are allowed per node in the cluster. With 3 java clients and in the absence of timeouts or socket errors we would expect a maximum of 900 connections per server.
On a timeout or socket error the client will close the socket and potentially open a new socket shortly afterwards. On the server that socket may remain open for proto-fd-idle-ms milliseconds which by default is 1 minute.
- What is your asyncMaxCommands configured to?
- What sort of socket timeout of you placing on requests to the server?
The asyncMaxCommands is set to 20000 currently. I set it to this high value, to be able to “cache” the commands for some seconds in case of a temporary network issue (asyncMaxCommandAction is set to BLOCK). We use about 6000 async put requests per node and sometimes have some network issues, so in that case this max command should be able to cache the commands for about 3 seconds. I would like to avoid blocking client calls.
K … then in this case, it is more than possible to generate this many connections. This isn’t necessarily a problem; some of our customers have around 2000 clients in the application layer using the cluster. In this case, it is normal to see 80K+ connections on a particular Aerospike server.
how did u change value of proto-fd-idle-ms ?? facing problem with connections max i am seeing only 100 connections per node
You can change the value of proto-fd-idle-ms using this command
asinfo -v "set-config:context=service;proto-fd-idle-ms=70000"