setting connectionTimedOut to 1 sec is throwing Socket Timed Out error

69 Views Asked by At

I am working on a web application which runs in pcf environment and it has approximately 100 users. I am using Hikari CP library to manage databae connections and customized connectionTimedout property by setting it to 1 sec in the application code. Connection pool size is set to 100.

In one scenario, making a call to stored procedure where I am explicitly creating

Connection = DriverManager.getConnection()

object as ArrayDescriptor() is expecting connection object. I am using ArrayDescriptor as input for stored procedure requires array of object.

However this code is throwing Socket Read Timed Out error randomly

The same code was working fine when configured with dbcp library managed connection pool.

Can anyone help? What's the problem with Hikari CP library?

As per compliance rules I can't post code on public domains.

1

There are 1 best solutions below

0
0gam On

connectionTimeout

This property controls the maximum number of milliseconds that a client (that's you) will wait for a connection from the pool. If this time is exceeded without a connection becoming available, a SQLException will be thrown. Lowest acceptable connection timeout is 250 ms. Default: 30000 (30 seconds)