Hello, Wondering if anyone would be able to help me with something here. I have a Mysql Server that handles quite a bit of data and there are scripts that run to update the tables all the time. Today I had a bit of an issue. One of the queries - It was updating a table ([State] => Sending data) - so mysql locked the table while the update was happening. This time the query took way to long because there was a missing primary key ( we added it back ) and anyways... ended up going for 39579 seconds and yay for us a website using that table got spidered at that time - and those queries had to wait for the first one to finish.. they pilled up ... and server reached max connections. I have these settings in /etc/my.cnf interactive_timeout = 600 and wait_timeout = 600 Actual Question: Is there a way to tell mysql to automatically kill off a query that takes longer than 5 minutes? - even when it's in the "State" => Sending data? Thank you,