C3P0: unreturnedConnectionTimeout in production?

这一生的挚爱 提交于 2019-12-05 11:27:23
Steve Waldman

You should debug your Connection leaks, and then not use unreturnedConnectionTimeout in production, ideally.

To debug Connection leaks, set both unreturnedConnectionTimeout and debugUnreturnedConnectionStackTraces, see http://www.mchange.com/projects/c3p0/#configuring_to_debug_and_workaround_broken_clients (archived here). Then, when you have no more leaks, unset both of these parameters.

You would set unreturnedConnectionTimeout in production mostly if for some reason you can't debug and fix the application whose Connections are leaking, in which case it's a reasonable workaround to just set unreturnedConnectionTimeout and let c3p0 clean up what your application forgets to.

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