Running out of DB connections!

前端 未结 5 1699
误落风尘
误落风尘 2021-02-03 11:52

I\'m running a Spring/Hibernate connecting to MySQL setup using c3p0 as my connection pool. For some bizarre reason it runs out of connections when the system is under load (of

5条回答
  •  爱一瞬间的悲伤
    2021-02-03 12:33

    I also had this problem and I solved it by setting the property checkoutTimeout of C3P0 to 0 instead of a value higher than 0.

    In fact I had lots of threads waiting for a connection and after 10s, the same erros as yours occured.

    See the doc here : http://www.mchange.com/projects/c3p0/#checkoutTimeout

提交回复
热议问题