Unusual DB Connection Patterns/Performance

Hi there,

We’ve run into some unusual performance problems with our connection pools and trying to understand what setting might be causing it. Overall we are seeing a slower connection for a new Payara server vs. a legacy alternative server. This is showing as 2 main strange patterns that we’ve noticed when using JProfiler to analyze things:

  1. The first connection/query seems to take an excessive amount of time to run. Subsequent (identical) queries are much faster. Are there settings that would create a connection, but not fully initialize it such that the first query incurs an overhead that subsequent ones would not? Not sure why it does that.

  2. We have our pools set to 50min/100max. When load testing, although we can see 100 active connections, the system seems to only use the first 8 when levelling out queries. Not sure why it wouldn’t spread the query load out fully amongst all of them?

Any input is appreciated, thank you!