How to Timeout JDBC Queries
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh13w8HAihAnAQpDttNdBt41zZJCZhM45NPW7Izd8uNutnGJt_2uL6E2dWMVU4DVL76ibrewhwJFgFc8q5jbIjS3goz9K5Nd4wrgMFzmbDX7p3ghXQF-l17FIUwo2G1D9vrBBrhsXDkLXs/s1600/springlogo.png)
JDBC queries by default do not have any timeout, which means that a query can block the thread for an unlimited amount time; of course, depending upon the DB load and the cost of the query. It is a good practice to timeout these queries if they can take longer than a certain amount of time.