Tweaked some of the default LockManager ttls
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 24 Oct 2014 05:19:19 +0000 (22:19 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 24 Oct 2014 05:19:19 +0000 (22:19 -0700)
Change-Id: Ic2c58ef02dc686f38840fe974a9d2858cd15c019

includes/filebackend/lockmanager/LockManager.php

index df8d2d4..762bc66 100644 (file)
@@ -72,9 +72,9 @@ abstract class LockManager {
        public function __construct( array $config ) {
                $this->domain = isset( $config['domain'] ) ? $config['domain'] : wfWikiID();
                if ( isset( $config['lockTTL'] ) ) {
-                       $this->lockTTL = max( 1, $config['lockTTL'] );
+                       $this->lockTTL = max( 5, $config['lockTTL'] );
                } elseif ( PHP_SAPI === 'cli' ) {
-                       $this->lockTTL = 2 * 3600;
+                       $this->lockTTL = 3600;
                } else {
                        $met = ini_get( 'max_execution_time' ); // this is 0 in CLI mode
                        $this->lockTTL = max( 5 * 60, 2 * (int)$met );