"is c3p0 thread-safe?" Code Answer


that warning comes from around line 2007 here. it seems to be a thread stuck trying to aquire a connection.

perhaps because the pool is set up to aquire more connections than what your mysql server is configured to handle. this seems to make sense, as the default max_connection is 100 (or 151 depending on your mysql version)

so that thread trying to aquire a connection goes in to a sleep()/retry loop trying to aquire the connection - however you close the whole pool while it's inside that loop - that thread gets interrupted so all resources can be reclaimed when you close the pool.

so far, it seems no harm done, your code likely returns connections to the pool when you're done with it leaving them idle for others to use, and all your queries get through.

By bcarlso on February 10 2022

Answers related to “is c3p0 thread-safe?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.