连接池 什么是 removeAbandoned?
connection pooling What are removeAbandoned?
什么是放弃的连接?如果我设置会发生什么
removeAbandoned = 假?
谢谢!
被放弃的连接是应用程序用来执行某些任务但应用程序没有关闭它们或者在没有关闭它们的过程中出现异常的连接。
设置 removeAbandoned = false
可能会导致连接断开错误,因为有太多连接处于放弃状态,那么您的应用程序将 运行 断开连接。将没有任何连接可用于执行任务。
设置 removeAbandoned = true
将在为 removeAbandonedTimeout
设置的时间限制后关闭连接。
此问题是由于应用程序中的连接泄漏引起的。
根据 Tomcat 页:
(boolean) Flag to remove abandoned connections if they exceed the
removeAbandonedTimeout. If set to true a connection is considered
abandoned and eligible for removal if it has been in use longer than
the removeAbandonedTimeout Setting this to true can recover db
connections from applications that fail to close a connection. See
also logAbandoned The default value is false.
什么是放弃的连接?如果我设置会发生什么 removeAbandoned = 假?
谢谢!
被放弃的连接是应用程序用来执行某些任务但应用程序没有关闭它们或者在没有关闭它们的过程中出现异常的连接。
设置 removeAbandoned = false
可能会导致连接断开错误,因为有太多连接处于放弃状态,那么您的应用程序将 运行 断开连接。将没有任何连接可用于执行任务。
设置 removeAbandoned = true
将在为 removeAbandonedTimeout
设置的时间限制后关闭连接。
此问题是由于应用程序中的连接泄漏引起的。
根据 Tomcat 页:
(boolean) Flag to remove abandoned connections if they exceed the removeAbandonedTimeout. If set to true a connection is considered abandoned and eligible for removal if it has been in use longer than the removeAbandonedTimeout Setting this to true can recover db connections from applications that fail to close a connection. See also logAbandoned The default value is false.