Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Vasily Kukhta
Thank you, I have changed timeBetweenEvictionRunsMillis value and it is working properly now. Another problem has appeared: although the timeout is handled correctly, no exception is thrown. I thought an SQLException would be thrown if query takes too long. Maybe pool does not throw exceptions at

Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Filip Hanik
Vasily, the exception depends on where the timeout occurs. If the timeout is triggered by the driver, because you hit the setQueryTimeout limit http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#setQueryTimeout(int) then yes, as per javadoc, it is up to the JDBC driver to throw an

Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Vasily Kukhta
So, it means that if the timeout is detected not using setQueryTimeout method, but by the tomcat pool settings (setMaxAge or setTimeBetweenEvictionRunsMillis), it means that no exception can be thrown at all? Vasily 2014-07-23 12:14 GMT+04:00 Filip Hanik fi...@hanik.com: Vasily, the

Re: Query timeouts using tomcat jdbc pool

2014-07-23 Thread Filip Hanik
maxAge is not a timeout setting. It simply means the connection gets retired(closed) instead of returned to the pool after a certain amount of time timeBetweenEvictionRunsMillis is not a timeout either. It is the interval that the thread checks for timeouts, but not query, connection checkout

Query timeouts using tomcat jdbc pool

2014-07-21 Thread Vasily Kukhta
Hello, dear tomcat users! I am developing high-load application using tomcat jdbc connection pool and Oracle database. It is very important to ensure my app to have very small DB query timeouts (no longer than 3 seconds) to prevent long-running queries or database slowness from blocking all my

Re: Query timeouts using tomcat jdbc pool

2014-07-21 Thread Daniel Mikusa
On Mon, Jul 21, 2014 at 11:05 AM, Vasily Kukhta v.b.kuk...@gmail.com wrote: Hello, dear tomcat users! I am developing high-load application using tomcat jdbc connection pool and Oracle database. It is very important to ensure my app to have very small DB query timeouts (no longer than 3

Re: Query timeouts using tomcat jdbc pool

2014-07-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vasily, On 7/21/14, 11:05 AM, Vasily Kukhta wrote: Oracle database. It is very important to ensure my app to have very small DB query timeouts (no longer than 3 seconds) to prevent long-running queries or database slowness from blocking all my