UPDATE: the issue is now fixed.
I would like to execute a query that takes more than 99,999 seconds to execute (e.g. SELECT SLEEP(150000);
). To change the timeout in MySQL Workbench, we have to go to Edit → Preferences → SQL Editor → DBMS connection read time out (in seconds). However, the DBMS connection read time out
field only accept up to 5 figures, and setting the field to 0 is equivalent to the default parameter (600 seconds). If the query takes more time than the timeout, I get the error message: Error Code: 2013. Lost connection to MySQL server during query
Hence my question: is it possible to increase this limit to over 99,999 seconds? I use Windows 7 64-bit Ultimate with MySQL Workbench 5.2.47 CE.
The DBMS connection read time out
field:
Timeout issue (0 is equivalent to the default parameter (600 seconds)):
SET SESSION MAX_EXECUTION_TIME=2000; Then any SELECT statements run in this particular session are aborted if they take more than 2 seconds to complete. Finally, the maximum execution time can also be set for a specific SELECT statement using the MAX_EXECUTION_TIME hint directly in the query.
Queries can become slow for various reasons ranging from improper index usage to bugs in the storage engine itself. However, in most cases, queries become slow because developers or MySQL database administrators neglect to monitor them and keep an eye on their performance.
Can I adjust the timeout? Yes, go to Preferences, SQL Editor, and adjust the DBMS connection read time out option that defaults to 600 seconds. This sets the maximum amount of time (in seconds) that a query can take before MySQL Workbench disconnects from the MySQL server.
Probably nobody ever thought you'd need such a high timeout, so you are limited to what is settable currently. But open a feature request on http://bugs.mysql.com to suggest either having 0 disable the timeout entirely or allow bigger values.
This issue is now solved in MySQL Workbench 6.0.3 (2013-07-09): See the bug report and the change log.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With