Home > database >  C3P0 connection reaches a value is the same, and did not reach the maximum number of connections
C3P0 connection reaches a value is the same, and did not reach the maximum number of connections

Time:09-26

There are two same log server, each with a capacity of 50 thread pool take log task from the queue inserted into the database, each task holds a C3P0 connection, and after the execution will release,
200, the maximum number of connections database configuration takes effect, but the actual runtime print C3P0 connection up to 51 and the same, all the remaining 149 idle, and write 20000 per minute or so of log
I initially thought it was my task thread pool up to 50 limits, to 200, found that the highest or only to 51
After one of the servers are closed, find another server execution efficiency is improved and can write 50000 log per minute, and print it out using the C3P0 connection also less, at best, only a dozen

Confirmed database resource is very abundant, is really don't know is what reason, still hope bosses give some inspiration to some directions,
  • Related