Added configuration option for memcached timeout based on comments on r58185
authorOverlordQ <overlordq@users.mediawiki.org>
Thu, 21 Jan 2010 05:49:49 +0000 (05:49 +0000)
committerOverlordQ <overlordq@users.mediawiki.org>
Thu, 21 Jan 2010 05:49:49 +0000 (05:49 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/memcached-client.php

index af2f180..0efac69 100644 (file)
@@ -94,7 +94,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added $wgAdvertisedFeedTypes to decide what feed types (RSS, Atom, both, or
   neither) MediaWiki advertises.  Default is array( 'atom' ), so RSS is no
   longer advertised by default (but it still works).
-
+* Added $wgMemCachedTimeout to configure connection timeouts for communicating
+  with a memcached server
 
 === New features in 1.16 ===
 
index 5f9e898..450d69b 100644 (file)
@@ -793,6 +793,7 @@ $wgUseMemCached     = false;
 $wgMemCachedDebug   = false; ///< Will be set to false in Setup.php, if the server isn't working
 $wgMemCachedServers = array( '127.0.0.1:11000' );
 $wgMemCachedPersistent = false;
+$wgMemCachedTimeout = 100000; //Server connection timeout in microseconds
 /**@}*/
 
 /**
index ea65846..3b0ae90 100644 (file)
@@ -244,6 +244,7 @@ class MWMemcached {
         * @return  mixed
         */
        public function __construct( $args ) {
+               global $wgMemCachedTimeout;
                $this->set_servers( @$args['servers'] );
                $this->_debug = @$args['debug'];
                $this->stats = array();
@@ -256,7 +257,7 @@ class MWMemcached {
                $this->_host_dead = array();
 
                $this->_timeout_seconds = 0;
-               $this->_timeout_microseconds = 50000;
+               $this->_timeout_microseconds = $wgMemCachedTimeout;
 
                $this->_connect_timeout = 0.01;
                $this->_connect_attempts = 2;