Aerospike_key_get_async() returned -7 - Max node/event loop async connections would be exceeded: 5

This is aerospike server on centos7 and version the aerospike client is at 4.6.17 C lang. In the C program if I set the event loop count to 5. 10. 20 its working good. But with event loop count = 40, I get the mentioned error.

Which tunable should be checked here?

I get the last number different for different configurations, does it represent the max value which is set or the value by which the client is falling short? aerospike_key_get_async() returned -7 - Max node/event loop BB9945D147AC40C async connections would be exceeded: 2

aerospike_key_get_async() returned -7 - Max node/event loop BB9945D147AC40C async connections would be exceeded: 5

I am trying to execute the get_async function from N number of threads started from the main

thank you -Vikrant

as_config.async_max_conns_per_node increasing from 300 to 500 or 1600 allows me to create more event loops

Q1. Do we have a formula to decide on the as_config.async_max_conns_per_node as a function of number of event loops? Q2. What is the drawback of keeping a higher value for as_config.async_max_conns_per_node? Q3. Is there any profiling tool on the client side which can tell us – used and unused connections – used and unused event loops

More than the following formula I see that the error occur rate is proportional to the number of threads calling aerospike_key_get_async concurrently

Good if we get a formula like

async_max_conns_per_node = Constant * number_of_event_loops * number_of_threads_calling_aerospike_key_get_async_concurrently

uint32_t as_config::async_max_conns_per_node

Maximum number of asynchronous (non-pipeline) connections allowed for each node. This limit will be enforced at the node/event loop level. If the value is 100 and 2 event loops are created, then each node/event loop asynchronous (non-pipeline) connection pool will have a limit of 50. Async transactions will be rejected if the limit would be exceeded. This variable is ignored if asynchronous event loops are not created.

Default: 300

Async commands must be throttled. Provide your own throttle or use max_commands_in_process.


as_policy_event p;
p.max_commands_in_process = 40;
p.max_commands_in_queue = 10000;

as_error err;

if (as_create_event_loops(&err, &p, 1, NULL) == AEROSPIKE_OK) {
	return true;
return false;
© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.