cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akhil Mehra <akhilme...@gmail.com>
Subject Re: configure pooling options to avoid BusyPoolException
Date Thu, 24 Aug 2017 01:17:04 GMT
Since queries are asynchronously executed, you will need some mechanism in your code to queue
your request. Try setting your setMaxQueueSize to meet your need. By default its 256

 http://docs.datastax.com/en/latest-java-driver-api/com/datastax/driver/core/PoolingOptions.html#setMaxQueueSize-int-

If setMaxQueueSize does not do the trick for you then you might need to look at throttling
your queries.

Regards,
Akhil


> On 24/08/2017, at 6:40 AM, Avi Levi <avi@indeni.com> wrote:
> 
> Hi ,
> I need to execute large amount (millions) of select queries. but I am getting BusyPoolExcption
how can I avoid that ? I tried to configure the pooling options but couldn't see that it had
any impact 
> Any advice ?
> Failed to execute query SELECT * FROM my_table WHERE id = 'some_uuid' AND x >= 1503501104
AND y < 1503501224;
> com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query
failed (tried: localhost/0:0:0:0:0:0:0:1:9042 (com.datastax.driver.core.exceptions.BusyPoolException:
[localhost/0:0:0:0:0:0:0:1] Pool is busy (no available connection and the queue has reached
its max size 256)))


Mime
View raw message