JDBC: additional thread for every query when using setQueryTimeout - by Patrick Zbinden

Status : 


Sign in
to vote
ID 785983 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 5/1/2013 5:08:38 AM
Access Restriction Public


We implement our applicaiton on JBoss Application Server.
To avoid endless running queries we use the "set-tx-query-timeout" flag. With this flag, on every statement setQueryTimeout will be used.

When having bigger load on the application, we use >120 db connections and sometimes execute thousands of statements per second.
This leeds to  massive creation of threads and can even lead to an OutOfMemory. Debugging the application for example in Eclipse is not possible anymore.
We can just see this behaviour on the microsoft jdbc driver, on Oracle for example, a single thread is used to handle the query timeout

Please fix this issue as soon as possible and give us a date when we could have a solution for that.
There is already a feature request to this issue (https://connect.microsoft.com/SQLServer/feedback/details/669427/property-to-create-timer-threads-per-statement-or-connection-in-jdbc-driver), but in my opinion it is just a bug, that must be solved
Sign in to post a comment.
Posted by Microsoft on 11/10/2015 at 2:53 PM

Thanks for filing this issue. We have known issues with timeouts and we are aware of this particular one.

This is something we are looking into, but we cannot comment on dates right now. When I have more information. I'll post it here.

For now, I'm resolving this issue as external, in order to popint it to our JDBC development database.