您的应用程序几乎肯定会泄漏连接。有关如何调试问题,请参见c3p0的文档。
TL; DR:设置
<property name="hibernate.c3p0.unreturnedConnectionTimeout">30</property><property name="hibernate.c3p0.debugUnreturnedConnectionStackTraces">true</property>
Check your logs for stack traces that check out Connections or Sessions in
your application but fail to reliably close() them. Fix that, by using
something like try-with-resources to reliably close things. When you have
fixed the problem, remove the above properties.
See also this



