Increasing account creation threshold

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(updating per conversation with Reedy & Dereckson)
Line 1: Line 1:
There are cases when the Wikimedia Foundation or others will host events that have a tendency of creating a large amount of new account requests during a short window of time. In order to not interrupt the activity it is best if the IP is effectively white listed to be excluded from rate limiting. This can easily be done if you change the '''wgRateLimitsExcludedIPs''' global setting in '''InitialiseSettings.php'''.
+
There are cases when the Wikimedia Foundation or others will host events that have a tendency of creating a large amount of new account requests during a short window of time. In order to not interrupt the activity it is best if the IP is effectively white listed to be excluded from rate limiting. This can easily be done if you add an '''$wmfThrottlingExceptions''' array in '''throttle.php''' (operations/mediawiki-config.git / wmf-config / throttle.php)
  
 
<pre>
 
<pre>
'wgRateLimitsExcludedIPs' => array(
+
$wmfThrottlingExceptions[] = array(
    'default' => array(),
+
      'from'   => '2012-10-06T00:00 +0:00',
    'enwiki' => array(
+
      'to'     => '2012-10-06T23:59 +0:00',
        '75.101.56.124', // usability office
+
      'IP'    => '12.183.19.7',
        '167.165.53.93', // proteins@msu.edu
+
      'dbname' => array( 'enwiki', 'commonswiki' ),
    ),   
+
      'value' => '50',
),
+
);
 
</pre>
 
</pre>
  

Revision as of 00:35, 19 October 2012

There are cases when the Wikimedia Foundation or others will host events that have a tendency of creating a large amount of new account requests during a short window of time. In order to not interrupt the activity it is best if the IP is effectively white listed to be excluded from rate limiting. This can easily be done if you add an $wmfThrottlingExceptions array in throttle.php (operations/mediawiki-config.git / wmf-config / throttle.php)

$wmfThrottlingExceptions[] = array(
       'from'   => '2012-10-06T00:00 +0:00',
       'to'     => '2012-10-06T23:59 +0:00',
       'IP'     => '12.183.19.7',
       'dbname' => array( 'enwiki', 'commonswiki' ),
       'value'  => '50',
);

If the ip is not known then you can also set wgAccountCreationThrottle to a value higher then 0

An example of this would be as follows in CommonSettings.php

if ( $wgDBname == 'idwiki' ) {
        # Account creation throttle disabled for outreach event
        # Contact: Siska Doviana <serenity@gmail.com>
        if ( time() > strtotime( '2008-08-08T08:00 +7:00' )
          && time() < strtotime( '2008-08-08T19:00 +7:00' ) )
        {
                $wgAccountCreationThrottle = 300;
        }
}

Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox