Thoughts: java connection pool to use precautions?

Thoughts: java connection pool to use precautions?
The maximum number of connections? --- abnormal increase in traffic, and will not no connection is available, and some buffer to create a new connection
maximum idle connections? The minimum number of idle connections? --- traffic increased sharply ready (some "rich" connection)
connection time, socket connection time? --- do not go default setting may be a long time, a relatively small set of reasonable value, rapid return, will not cause "outside the operating environment of" blocking
idle detection --- idle for too long, maybe all invalid, How often detected, how long is idle evict: this strategy which involves testing; the deletion have to delete?
check whether the validity of the connection when the connection from the pool to get inside, returned to the pond? Is borrow, is retrurn, this thing is still out when it create when idle check?

 

External operating environment: refers to the code that is currently running thread environment where (the thread may be a thread pool, if blocked for too long, under high concurrency, likely to cause depletion of the thread)

Guess you like

Origin www.cnblogs.com/big1987/p/11404921.html