If you’re running a query from a Python script, use the connection argument:Ĭon. On the command line, use the connect_timeout variable. Select the Advanced tab and increase the Socket Timeout value.Control-click on a connection item and select Connection Properties > Edit Connection.Save the settings, quite MySQL Workbench and reopen the connection.Look for the MySQL Session section and increase the DBMS connection read time out value.In the application menu, select Edit > Preferences > SQL Editor.You can edit the SQL Editor preferences in MySQL Workbench: You can increase your MySQL client’s timeout values if you don’t have administrator access to the MySQL server. The MySQL documentation suggests increasing the net_read_timeout or connect_timeout values on the server. If you’re an administrator for your MySQL server, try changing some values. Re-writing the queries isn’t always option so you can try the following server-side and client-side workarounds. For my purposes, I’ve found that denormalizing content into working tables can improve the read performance. This should have the added benefit of making your query easier to read. Where possible, try reducing the number of joins in a single query. For example, instead of joining all the contents of two very large tables, try filtering out the records you don’t need. In many cases, you can avoid the problem entirely by refining your SQL queries. Avoid the problem by refining your queries Joins of large datasets from these types of tables can be especially intensive. I’ve found the WordPress wp_postmeta table especially troublesome because a site with tens of thousands of posts can easily have several hundred thousand postmeta entries. These projects usually involve running complex MySQL queries that take a long time to complete. Most of my work involves content migrations. Essentially, it took too long for the query to return data so the connection gets dropped. This error appears when the connection between your MySQL client and database server times out. This article offers some suggestions on how to avoid or fix the problem. Lost connection to MySQL server during query. XAMPP is an easy to install Apache distribution containing MariaDB, PHP, and Perl. This is a problem because I use an encrypted home directory on the home computer, which doesn't allow the files to be re-encrypted until that (now-dead) SSH connection is killed.If you spend time running lots of MySQL queries, you might come across the Error Code: 2013. When I restore internet connectivity and re-connect to the home computer using a new SSH tunnel, though, I can see using #ps ax that the old SSH connection process is still running. Internet interruptions cause my SSH tunnel to close (of course). Occasionally, my internet connection on my remote computer gets interrupted. The remote computer also has SetAliveInterval set to 60 in /etc/ssh/ssh_config, so that the connection doesn't die if I step away from the computer for a moment. The remote computer is able to connect to the home computer without problems. I keep one of my computers at home and use SSH to connect to it from the other ("remote") computer. I have two computers, both of which run Ubuntu 12.04. I have a question to which I haven't been able to find an answer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |