error connections would be exceeded: 300

316 Views Asked by At

When i am trying to connect aerospike(PHP Client) then i am getting an error

object(Aerospike)#4 (2) {
    ["errorno":"Aerospike":private] =>
        int(-7) ["error":"Aerospike":private] => 
             string(59) "Max node BB93615E8270008 connections would be exceeded: 300"
}
1

There are 1 best solutions below

0
On

The Aerospike client for PHP has a constructor config max_threads that by default is set to 300. The PHP client is built around the C client, and passes that configuration down to the C client instance. Error status code -7 is AEROSPIKE_ERR_NO_MORE_CONNECTIONS. You could increase the max_threads.

However, I'm not sure is how you're getting this error. The non-ZTS PHP client is a single execution thread, and those connections should be reused. It's really only an issue in multi-threaded environments like HHVM, Java, C, etc when multiple commands are executing in parallel. Please give more information about your code and environment.