inline... On Tue, Aug 12, 2025 at 1:46 PM Daniel Schwartz <[email protected]> wrote:
> > DGS: I was going by what the person at Omnifish had told me. I just > checked, and you can't set the maximum pool size to 1. The minimum is 8. > So I did this and within seconds the system stopped working and I got the > following in the log file: > > "Caused by: javax.resource.spi.ResourceAllocationException: Error in > allocating a connection. Cause: In-use connections equal max-pool-size and > expired max-wait-time. Cannot allocate more connections." > > Also, > > "Caused by: com.sun.appserv.connectors.internal.api.PoolingException: > In-use connections equal max-pool-size and expired max-wait-time. Cannot > allocate more connections." > > Then I went back and reset the maximum pool size to 1000, and it > started working again. > > Based on the error message and some quick Google searches, there is a setting to control the maximum wait time (max-wait-time). The default is supposed to be 60 seconds, so that's a red flag right there -- do you expect to be holding connections for so long that waiting threads / requests would have to wait for more than 60 seconds? Using a connection for around 60 seconds would be a really long DB query, or a very slow database server / instance. You may want to validate the Glassfish configuration option, and understand how long your requests are holding connections for, etc. Something is still very odd with your application's behavior.
