Removing bad connection from pool

14 views
Skip to first unread message

Ashok Kumar

unread,
Jun 4, 2021, 6:10:59 PM6/4/21
to mybati...@googlegroups.com
I am facing wierd issue with mybatis connection pool. I have described the
issue below.

I use spark thrift server to connect to from mybatis. It works well till
spark thriftserver is running good. When Spark thriftserver is restarted, I
start getting "broken pipe" issue. Eventhough thriftserver is restarted
properly, i get this issue.
This issue goes away only by restarting application.

I did some debug at mybatis code and found that there is no way to tell
mybatis connection pooling to remove bad connection from idle connection
pool when there is exception other than "ping connection".

I can use "ping connection" with default "poolPingConnectionsNotUsedFor" as
"0". But issue with this is its sync call. So everytime i execute query ,
ping will happen to execute test query, which i feel is not good idea.

I didn't find any other way to remove bad connection from pool, May somebody
pls suggest how to go forward with this issue.




--
Sent from: http://mybatis-user.963551.n3.nabble.com/
Reply all
Reply to author
Forward
0 new messages