[wp-trac] [WordPress Trac] #15298: New DB_TIMEOUT Constant in wp-config.php to be used in wp-db.php

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 2 19:13:20 UTC 2010


#15298: New DB_TIMEOUT Constant in wp-config.php to be used in wp-db.php
-----------------------------+----------------------------------------------
 Reporter:  sc0ttkclark      |       Owner:                 
     Type:  feature request  |      Status:  new            
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Database         |     Version:  3.1            
 Severity:  minor            |    Keywords:                 
-----------------------------+----------------------------------------------
 This is really just highlighting a fix that I found useful:

 http://thesocialmediaguide.com.au/2010/07/31/solution-for-wordpress-
 database-error-mysql-server-has-gone-away-for-query/

 I believe by making this a core thing, by just hooking in with DB_TIMEOUT,
 this can help people tweak their configurations more easily.

 Code could be:

 if ( define( 'DB_TIMEOUT' ) AND DB_TIMEOUT > 0 )
     $this->query("SET SESSION wait_timeout=" . DB_TIMEOUT);

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15298>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list