The last packet sent successfully to the server was > 70,400,003 milliseconds ago. is longer than the server configured

扶醉桌前 提交于 2019-12-02 07:44:48

To start, keep your testing simple, just use

<property name="hibernate.c3p0.testConnectionOnCheckout" value="true" />

instead of the idle Connection check. See c3p0 docs on Connection testing

If the problem, um, persists then the issue isn't likely to be Connections held by the pool, but some Connection or Connections that your application is checking out and holding open for an indefinite period. Ideally, Connections should be checked out, used, then checked in immediately (and robustly, using try-with-resources or a careful finally block).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!