The Glassfish4 server installed on my machine has Maximum Pool Size = 32 connections. Two cron jobs are scheduled from my application after every 10 and 15 mins on this server. The server crashed after 2 hours with the exception "java.sql.SQLException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections."
So, I altered the JDBC Connection pool settings and put in really large numbers just to see what would happen.
Maximum Pool Size: 1000000000 (1 billion) Max Wait Time: 300000 (5 minutes)
Now my cron jobs are running fine.
Do you think having set the JDBC Connection pool attributes this high could cause issues? Please advise what values will be optimum.