Spring transaction hangs for iptables command

混江龙づ霸主 提交于 2019-12-24 04:48:11

问题


As part of error handling for our processes, we have tried to disable the communication between the process to the database machine listener port using the following iptables command

 iptables -A INPUT -p tcp --destination-port <database-listener-port> -s <database-host-ip> -j DROP

However, this cause the process to get stuck with the following log coming from AbstractPlatformTransactionManager::getTransaction

 DEBUG:  Creating new transaction with name [<Transaction-Name>]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''

Enabling it, later on with 'iptables -F' makes the transaction 'get back to life' again and the connection is being retrieved and ends successfully.

We are most concern with the fact all connection timeout configuration were not activated (?) and therefore we so such hangs, none of our connection pool defaults (see below) has such infinite timeout (we tried also giving a small default for the abandonedConnectionTimeout but it didn't help and we returned for the true default we believe should be in production) and we expected some kind of cancel operation should be performed.

abandonedConnectionTimeout=0
acquireIncrement=5
acquireRetryAttempts=3
checkoutTimeout=5000
idleConnectionTestPeriod=60
inactivityTimeout=1800
inactivityTimeoutforNonUsedConnection=1800
validateConnection=true

Thanks for any assist on this matter.

来源:https://stackoverflow.com/questions/26417384/spring-transaction-hangs-for-iptables-command

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