title: Glassfish Server4 maximum pool size and max wait time
body: <p>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."</p>
  
  <p>So, I altered the JDBC Connection pool settings and put in really large numbers just to see what would happen.</p>
  
  <p>Maximum Pool Size: 1000000000 (1 billion)
  Max Wait Time: 300000 (5 minutes)</p>
  
  <p>Now my cron jobs are running fine.</p>
  
  <p>Do you think having set the JDBC Connection pool attributes this high could cause issues? Please advise what values will be optimum.</p>