I'm troubleshooting a series of reoccurring errors: WordPress database error MySQL server has gone away for query ...
I think I've found a solution here but it's a few years old and I want to better understand the MySQL wait_timeout and it's relationship to Wordpress before I start monkeying with core files or reconfiguring my server. (I'm on a virtual dedicated server, so I have the option to change the wait_timeout on the server.)
I checked by running SHOW VARIABLES; from phpMyAdmin and wait_timeout is currently set to 35. That seems low to me, but I don't fully understand what it does. I'm considering changing it to 600.
My main question is whether this is a responsible thing to do or not. But I think that broader question can be divided into smaller parts: 1. Do I have the option to override this setting with PHP (Wordpress)? 2. What is the optimal setting is for medium-large Wordpress site? 3. Are there any Wordpress configuration options or filters that I could use to change the setting without modifying core files?
Thanks.