maximumPoolSize = threadSize / (connectionTimeOut * timePerSQL)
threadSize: The number of threads executing SQL simultaneously
connectionTimeOut: indicates the timeout period of the connection
maximumPoolSize: indicates the maximum number of connections in the
connection pool
timePerSQL: execution time per thread.
The number of threads can be greater than the number of connection pools, but please make sure that connections are released in a timely manner within the thread. For example, if it takes 5 seconds to get a connection in each thread , execute the query and close the connection.
maximumPoolSize is 10 and connectionTimeout is 30 second, the processing capacity of the application is 30/5s * 10, that is, the maximum number of connections that can be maintained is 60. If the number exceeds 60, an error will definitely be reported.
hence maximumPoolSize is 60 . but it also depends on the cpu of your server,that would be complicated