-1

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.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • What is `connectionTimedOut`? Do you mean `connectionTimeout`? In any case 1s is far too small. Use 10s or 30s or 1m. And what does ``ArrayDescriptor()` is expecting connection object` mean? What is `ArrayDescriptor()`? Why is it relevant? What do [tag:spring] and [tag:spring-boot] have to do with it? – user207421 Jul 07 '20 at 05:58
  • @Marquis of Lorne I am using spring jdbc to execute a stored procedure by passing paramters a1, a2& other `ArrayDescriptor arrDesc = new ArrayDescriptor("VARCHAR_ARRAY", connection); ARRAY a1= new ARRAY(arrDesc, connection, array); ARRAY a2= new ARRAY(arrDesc, connection, userRolesArr);` – Mohanrao Kolisetti Jul 08 '20 at 10:12
  • @MarquisofLorne please check my comments – Mohanrao Kolisetti Jul 08 '20 at 12:26

1 Answers1

1

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)

0gam
  • 1,343
  • 1
  • 9
  • 21