views:

1195

answers:

2

Hey guys, it's possible to timeout query in MySQL? So if any query will exceed this timeout, it will be killed by MySQL and it will return error instead of waiting for eternity.

+3  A: 

The MySQL forum has some threads about this.

This post details how to set up timeouts on the server using innodb_lock_wait_timeout.

Here's a way to do it programmatically, assuming you're using JDBC.

David