<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Acenet Knowledgebase  - Recent changes [en]</title>
		<link>https://kb.acenet.us/Special:RecentChanges</link>
		<description>Track the most recent changes to the wiki in this feed.</description>
		<language>en</language>
		<generator>MediaWiki 1.45.3</generator>
		<lastBuildDate>Thu, 10 Sep 2026 21:53:00 GMT</lastBuildDate>
		<item>
			<title>MediaWiki Limit Crawler Resource Usage</title>
			<link>https://kb.acenet.us/index.php?title=MediaWiki_Limit_Crawler_Resource_Usage&amp;diff=2733&amp;oldid=2732</link>
			<guid isPermaLink="false">https://kb.acenet.us/index.php?title=MediaWiki_Limit_Crawler_Resource_Usage&amp;diff=2733&amp;oldid=2732</guid>
			<description>&lt;p&gt;wrong syntax&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:49, 2 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l94&quot;&gt;Line 94:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 94:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&quot;php&quot;&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgMiserMode = true;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgMiserMode = true;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This setting exists specifically for this situation. It disables the most expensive special pages and serves cached results for the remainder instead of recomputing them on each request. Wikipedia runs with it enabled. On a small or medium wiki there is no meaningful downside.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This setting exists specifically for this situation. It disables the most expensive special pages and serves cached results for the remainder instead of recomputing them on each request. Wikipedia runs with it enabled. On a small or medium wiki there is no meaningful downside.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l106&quot;&gt;Line 106:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 106:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;By default MediaWiki regenerates every page from the database on every request. For logged-in users that is unavoidable. For anonymous visitors — which includes all crawler traffic — it is pure waste.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;By default MediaWiki regenerates every page from the database on every request. For logged-in users that is unavoidable. For anonymous visitors — which includes all crawler traffic — it is pure waste.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&quot;php&quot;&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgMainCacheType   = CACHE_ACCEL;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgMainCacheType   = CACHE_ACCEL;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgUseFileCache    = true;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgUseFileCache    = true;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgFileCacheDirectory = &amp;quot;$IP/cache&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$wgFileCacheDirectory = &amp;quot;$IP/cache&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File cache is the important one. It writes rendered HTML to disk and serves anonymous page views directly from it, skipping the parser and most database work. Crawler load typically falls by an order of magnitude.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File cache is the important one. It writes rendered HTML to disk and serves anonymous page views directly from it, skipping the parser and most database work. Crawler load typically falls by an order of magnitude.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l124&quot;&gt;Line 124:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 124:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Those requests have to be refused before PHP starts. In &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; at the document root:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Those requests have to be refused before PHP starts. In &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; at the document root:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&quot;apache&quot;&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteCond %{HTTP_COOKIE} !(UserID|_session) [NC]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteCond %{HTTP_COOKIE} !(UserID|_session) [NC]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteCond %{QUERY_STRING} (^|&amp;amp;)returnto= [NC,OR]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteCond %{QUERY_STRING} (^|&amp;amp;)returnto= [NC,OR]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteCond %{QUERY_STRING} title=Special(%3A|:)(ListFiles|Contributions|PrefixIndex|Log) [NC]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteCond %{QUERY_STRING} title=Special(%3A|:)(ListFiles|Contributions|PrefixIndex|Log) [NC]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteRule ^/?w/index\.php$ - [F,L]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;RewriteRule ^/?w/index\.php$ - [F,L]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The cookie condition is what makes this safe. Visitors who are logged in or hold an active session still reach these pages normally; only anonymous requests to the combinatorial URLs receive a 403.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The cookie condition is what makes this safe. Visitors who are logged in or hold an active session still reach these pages normally; only anonymous requests to the combinatorial URLs receive a 403.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 02 Sep 2026 16:49:27 GMT</pubDate>
			<dc:creator>Docs admin</dc:creator>
			<comments>https://kb.acenet.us/Talk:MediaWiki_Limit_Crawler_Resource_Usage</comments>
		</item>
		<item>
			<title>W/index.php</title>
			<link>https://kb.acenet.us/index.php?title=W/index.php&amp;diff=2732&amp;oldid=0</link>
			<guid isPermaLink="false">https://kb.acenet.us/index.php?title=W/index.php&amp;diff=2732&amp;oldid=0</guid>
			<description>&lt;p&gt;&lt;a href=&quot;/index.php?title=User:Docs_admin&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;mw-userlink new&quot; title=&quot;User:Docs admin (page does not exist)&quot;&gt;&lt;bdi&gt;Docs admin&lt;/bdi&gt;&lt;/a&gt; moved page &lt;a href=&quot;/index.php?title=W/index.php&amp;amp;redirect=no&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;W/index.php (page does not exist)&quot;&gt;W/index.php&lt;/a&gt; to &lt;a href=&quot;/MediaWiki_Limit_Crawler_Resource_Usage&quot; title=&quot;MediaWiki Limit Crawler Resource Usage&quot;&gt;MediaWiki Limit Crawler Resource Usage&lt;/a&gt; without leaving a redirect Misspelled title&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
A default MediaWiki installation exposes an effectively unlimited number of expensive, uncacheable URLs. Search engines, AI crawlers and commercial scrapers will find them and request them continuously. On shared hosting this exhausts the account&amp;#039;s resource limits and takes the site offline for real visitors.&lt;br /&gt;
&lt;br /&gt;
This is one of the most common causes of resource-limit errors on MediaWiki sites, and every fix below is a documented MediaWiki recommendation rather than a workaround.&lt;br /&gt;
&lt;br /&gt;
== Symptoms ==&lt;br /&gt;
&lt;br /&gt;
* Visitors see &amp;#039;&amp;#039;&amp;#039;508 Resource Limit Is Reached&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;503 Service Unavailable&amp;#039;&amp;#039;&amp;#039;, often intermittently.&lt;br /&gt;
* The site is slow or unreachable while the server itself is idle.&lt;br /&gt;
* Errors arrive in bursts lasting a few minutes, at no consistent time of day.&lt;br /&gt;
* Access logs show large numbers of requests to &amp;lt;code&amp;gt;/w/index.php&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;title=Special:...&amp;lt;/code&amp;gt; in the query string.&lt;br /&gt;
* Requests come from many different IP addresses, each sending only one or two requests.&lt;br /&gt;
&lt;br /&gt;
The burst pattern is the key signal. Ordinary traffic growth is gradual. Crawler-induced exhaustion is sudden, brief, and repeats at unpredictable intervals.&lt;br /&gt;
&lt;br /&gt;
== Why MediaWiki is affected more than most applications ==&lt;br /&gt;
&lt;br /&gt;
MediaWiki serves content from two separate URL spaces:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The article path&amp;#039;&amp;#039;&amp;#039; — &amp;lt;code&amp;gt;/wiki/Page_Name&amp;lt;/code&amp;gt;. Real content. Cacheable. A finite number of pages.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The script path&amp;#039;&amp;#039;&amp;#039; — &amp;lt;code&amp;gt;/w/index.php?...&amp;lt;/code&amp;gt;. Everything else: editing, history, logs, search, user pages, login. Generated live from the database on every request.&lt;br /&gt;
&lt;br /&gt;
Nearly all crawler damage happens in the second space, for three reasons that compound.&lt;br /&gt;
&lt;br /&gt;
=== Special pages are generated, not stored ===&lt;br /&gt;
&lt;br /&gt;
Pages in the &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; namespace are database queries rendered on demand. &amp;lt;code&amp;gt;Special:Contributions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Special:ListFiles&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Special:PrefixIndex&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Special:Log&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Special:RecentChanges&amp;lt;/code&amp;gt; are excluded from the parser cache by design, because their output changes constantly.&lt;br /&gt;
&lt;br /&gt;
Every request means a full PHP startup plus live SQL. There is no cheap path.&lt;br /&gt;
&lt;br /&gt;
=== Every page links to them ===&lt;br /&gt;
&lt;br /&gt;
The sidebar, footer and toolbox on every article link into the &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; namespace. A crawler that discovers a single article discovers the entire machinery within one hop.&lt;br /&gt;
&lt;br /&gt;
=== The URL space is unbounded ===&lt;br /&gt;
&lt;br /&gt;
MediaWiki&amp;#039;s login link records where the visitor came from, so it can return them there afterwards. That means there is not one login URL — there is one for every page a visitor could have been on, multiplied by every query variant that page could have carried:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/w/index.php?title=Special:UserLogin&amp;amp;returnto=Special:Log/block&amp;amp;returntoquery=page=User:203.0.113.9&lt;br /&gt;
/w/index.php?title=Special:UserLogin&amp;amp;returnto=Special:PrefixIndex/User:198.51.100.4/&amp;amp;returntoquery=printable=yes&lt;br /&gt;
/w/index.php?title=Special:ListFiles&amp;amp;user=203.0.113.44&lt;br /&gt;
/w/index.php?printable=yes&amp;amp;title=User_talk:198.51.100.7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifiers such as &amp;lt;code&amp;gt;printable=yes&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;action=history&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;oldid=&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diff=&amp;lt;/code&amp;gt; multiply the space again.&lt;br /&gt;
&lt;br /&gt;
The result is a small wiki presenting a mathematically infinite set of distinct URLs, almost none of which are worth indexing. A crawler cannot detect this. It sees new links indefinitely and keeps requesting them.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Factor !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| Special pages bypass the parser cache || Every request costs full PHP + SQL&lt;br /&gt;
|-&lt;br /&gt;
| Sidebar and footer link to Special pages || Crawlers reach them from any article&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;returnto&amp;lt;/code&amp;gt; encodes the previous page || One login URL per page, per query variant&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;printable&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;oldid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;diff&amp;lt;/code&amp;gt; || Multiplies every URL above&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Fixes ==&lt;br /&gt;
&lt;br /&gt;
Apply these in order. The first two take minutes and carry no risk. The last one is the only step that can break a working site.&lt;br /&gt;
&lt;br /&gt;
=== 1. robots.txt ===&lt;br /&gt;
&lt;br /&gt;
This is the single highest-value change and is recommended in MediaWiki&amp;#039;s own manual. Most installations never do it.&lt;br /&gt;
&lt;br /&gt;
Place the following at the &amp;#039;&amp;#039;&amp;#039;document root&amp;#039;&amp;#039;&amp;#039; of the domain — &amp;lt;code&amp;gt;/robots.txt&amp;lt;/code&amp;gt;, not inside &amp;lt;code&amp;gt;/w/&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User-agent: *&lt;br /&gt;
Disallow: /w/&lt;br /&gt;
Allow: /w/load.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Content under &amp;lt;code&amp;gt;/wiki/&amp;lt;/code&amp;gt; remains fully indexable. The machinery under &amp;lt;code&amp;gt;/w/&amp;lt;/code&amp;gt; stops being crawled.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; exception matters: that endpoint serves the site&amp;#039;s CSS and JavaScript. Search engines penalise pages they cannot render, so it must stay reachable.&lt;br /&gt;
&lt;br /&gt;
To exclude a specific crawler entirely — for example if the site&amp;#039;s content should not be used for AI training — add a matching block. Well-behaved crawlers publish their user-agent string and honour these directives:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User-agent: GPTBot&lt;br /&gt;
Disallow: /&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whether to do this is an editorial decision about the content, not a technical one.&lt;br /&gt;
&lt;br /&gt;
=== 2. Enable miser mode ===&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$wgMiserMode = true;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This setting exists specifically for this situation. It disables the most expensive special pages and serves cached results for the remainder instead of recomputing them on each request. Wikipedia runs with it enabled. On a small or medium wiki there is no meaningful downside.&lt;br /&gt;
&lt;br /&gt;
=== 3. Enable caching ===&lt;br /&gt;
&lt;br /&gt;
This is the underlying weakness, and fixing it is what makes the site resilient rather than merely less attractive to crawlers.&lt;br /&gt;
&lt;br /&gt;
By default MediaWiki regenerates every page from the database on every request. For logged-in users that is unavoidable. For anonymous visitors — which includes all crawler traffic — it is pure waste.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$wgMainCacheType   = CACHE_ACCEL;&lt;br /&gt;
$wgUseFileCache    = true;&lt;br /&gt;
$wgFileCacheDirectory = &amp;quot;$IP/cache&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File cache is the important one. It writes rendered HTML to disk and serves anonymous page views directly from it, skipping the parser and most database work. Crawler load typically falls by an order of magnitude.&lt;br /&gt;
&lt;br /&gt;
If the hosting account has Redis or Memcached available, point &amp;lt;code&amp;gt;$wgMainCacheType&amp;lt;/code&amp;gt; at it instead of &amp;lt;code&amp;gt;CACHE_ACCEL&amp;lt;/code&amp;gt;. Check with the hosting provider before assuming either is present.&lt;br /&gt;
&lt;br /&gt;
Confirm the installed MediaWiki version at &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; before applying cache settings — some options have been renamed or removed across releases, and the current manual for that specific version is authoritative.&lt;br /&gt;
&lt;br /&gt;
=== 4. Reject the worst URLs at the web server ===&lt;br /&gt;
&lt;br /&gt;
The first three steps handle every crawler that follows the rules. They do nothing about scrapers that rotate user-agent strings and route through residential proxy networks, which ignore &amp;lt;code&amp;gt;robots.txt&amp;lt;/code&amp;gt; entirely.&lt;br /&gt;
&lt;br /&gt;
Those requests have to be refused before PHP starts. In &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; at the document root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
RewriteCond %{HTTP_COOKIE} !(UserID|_session) [NC]&lt;br /&gt;
RewriteCond %{QUERY_STRING} (^|&amp;amp;)returnto= [NC,OR]&lt;br /&gt;
RewriteCond %{QUERY_STRING} title=Special(%3A|:)(ListFiles|Contributions|PrefixIndex|Log) [NC]&lt;br /&gt;
RewriteRule ^/?w/index\.php$ - [F,L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cookie condition is what makes this safe. Visitors who are logged in or hold an active session still reach these pages normally; only anonymous requests to the combinatorial URLs receive a 403.&lt;br /&gt;
&lt;br /&gt;
A 403 returned by mod_rewrite costs microseconds. A rendered &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; page costs a full application slot.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Test this rule before relying on it. An error in the cookie condition will lock legitimate users out of logging in. Verify that you can log in, edit, and view page history with the rule active.}}&lt;br /&gt;
&lt;br /&gt;
== Verifying the fix ==&lt;br /&gt;
&lt;br /&gt;
After deploying, confirm the change in the raw access logs rather than in a dashboard. Substitute the correct log path for the hosting account.&lt;br /&gt;
&lt;br /&gt;
Count requests to the script path over a recent window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
awk &amp;#039;$7 ~ /index\.php/&amp;#039; access_log | wc -l&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Break down response codes, looking for the disappearance of 508 and 503:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
awk &amp;#039;{print $9}&amp;#039; access_log | sort | uniq -c | sort -rn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Identify which clients are still reaching the script path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
awk -F&amp;#039;&amp;quot;&amp;#039; &amp;#039;$0 ~ /index\.php/ {print $6}&amp;#039; access_log | sort | uniq -c | sort -rn | head&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expect the total to fall sharply within a day, as crawlers re-read &amp;lt;code&amp;gt;robots.txt&amp;lt;/code&amp;gt; on their own schedule rather than immediately.&lt;br /&gt;
&lt;br /&gt;
=== Reading the user-agent results ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;One user-agent, high count, consistent format.&amp;#039;&amp;#039;&amp;#039; A declared crawler. Verify it before blocking — most major operators publish their address ranges, and a forged user-agent is common. Reverse DNS is not a reliable check on its own.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Several near-identical browser strings with similar counts, then a sharp drop-off.&amp;#039;&amp;#039;&amp;#039; Automation. Real browser populations do not distribute evenly across a handful of versions.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Many distinct IP addresses sending one request each.&amp;#039;&amp;#039;&amp;#039; A residential proxy pool. Blocking individual addresses will not work; the source rotates on every burst.&lt;br /&gt;
&lt;br /&gt;
== Common misconceptions ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;The pages already send &amp;lt;code&amp;gt;noindex&amp;lt;/code&amp;gt;, so crawlers leave them alone.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Recent MediaWiki versions do send &amp;lt;code&amp;gt;noindex,nofollow&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; pages. That instructs a crawler not to index the result — but the request has already been made and the resources already spent by the time the header is read. Only &amp;lt;code&amp;gt;robots.txt&amp;lt;/code&amp;gt; prevents the request itself.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;We will block the offending IP addresses.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Effective against a single misbehaving crawler, useless against proxy pools. Each burst typically arrives from a different source, so blocking is permanently one step behind.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;The server needs more memory.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Occasionally true, usually not. A properly cached wiki serves this traffic comfortably within standard shared-hosting limits. Raising limits without fixing the cause postpones the outage rather than preventing it.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;This is an attack.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Almost never. The overwhelming majority of these incidents are ordinary crawlers encountering a site that offers infinite expensive URLs. The request volume is usually modest — a few thousand requests spread over hours. What makes it fatal is cost per request, not request rate.&lt;/div&gt;</description>
			<pubDate>Wed, 02 Sep 2026 16:48:24 GMT</pubDate>
			<dc:creator>Docs admin</dc:creator>
			<comments>https://kb.acenet.us/Talk:W/index.php</comments>
		</item>
		<item>
			<title>W/index.php</title>
			<link>https://kb.acenet.us/index.php?title=W/index.php&amp;diff=2731&amp;oldid=0</link>
			<guid isPermaLink="false">https://kb.acenet.us/index.php?title=W/index.php&amp;diff=2731&amp;oldid=0</guid>
			<description>&lt;p&gt;Created page with &amp;quot;__TOC__  A default MediaWiki installation exposes an effectively unlimited number of expensive, uncacheable URLs. Search engines, AI crawlers and commercial scrapers will find them and request them continuously. On shared hosting this exhausts the account&amp;#039;s resource limits and takes the site offline for real visitors.  This is one of the most common causes of resource-limit errors on MediaWiki sites, and every fix below is a documented MediaWiki recommendation rather tha...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
A default MediaWiki installation exposes an effectively unlimited number of expensive, uncacheable URLs. Search engines, AI crawlers and commercial scrapers will find them and request them continuously. On shared hosting this exhausts the account&amp;#039;s resource limits and takes the site offline for real visitors.&lt;br /&gt;
&lt;br /&gt;
This is one of the most common causes of resource-limit errors on MediaWiki sites, and every fix below is a documented MediaWiki recommendation rather than a workaround.&lt;br /&gt;
&lt;br /&gt;
== Symptoms ==&lt;br /&gt;
&lt;br /&gt;
* Visitors see &amp;#039;&amp;#039;&amp;#039;508 Resource Limit Is Reached&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;503 Service Unavailable&amp;#039;&amp;#039;&amp;#039;, often intermittently.&lt;br /&gt;
* The site is slow or unreachable while the server itself is idle.&lt;br /&gt;
* Errors arrive in bursts lasting a few minutes, at no consistent time of day.&lt;br /&gt;
* Access logs show large numbers of requests to &amp;lt;code&amp;gt;/w/index.php&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;title=Special:...&amp;lt;/code&amp;gt; in the query string.&lt;br /&gt;
* Requests come from many different IP addresses, each sending only one or two requests.&lt;br /&gt;
&lt;br /&gt;
The burst pattern is the key signal. Ordinary traffic growth is gradual. Crawler-induced exhaustion is sudden, brief, and repeats at unpredictable intervals.&lt;br /&gt;
&lt;br /&gt;
== Why MediaWiki is affected more than most applications ==&lt;br /&gt;
&lt;br /&gt;
MediaWiki serves content from two separate URL spaces:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The article path&amp;#039;&amp;#039;&amp;#039; — &amp;lt;code&amp;gt;/wiki/Page_Name&amp;lt;/code&amp;gt;. Real content. Cacheable. A finite number of pages.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The script path&amp;#039;&amp;#039;&amp;#039; — &amp;lt;code&amp;gt;/w/index.php?...&amp;lt;/code&amp;gt;. Everything else: editing, history, logs, search, user pages, login. Generated live from the database on every request.&lt;br /&gt;
&lt;br /&gt;
Nearly all crawler damage happens in the second space, for three reasons that compound.&lt;br /&gt;
&lt;br /&gt;
=== Special pages are generated, not stored ===&lt;br /&gt;
&lt;br /&gt;
Pages in the &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; namespace are database queries rendered on demand. &amp;lt;code&amp;gt;Special:Contributions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Special:ListFiles&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Special:PrefixIndex&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Special:Log&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Special:RecentChanges&amp;lt;/code&amp;gt; are excluded from the parser cache by design, because their output changes constantly.&lt;br /&gt;
&lt;br /&gt;
Every request means a full PHP startup plus live SQL. There is no cheap path.&lt;br /&gt;
&lt;br /&gt;
=== Every page links to them ===&lt;br /&gt;
&lt;br /&gt;
The sidebar, footer and toolbox on every article link into the &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; namespace. A crawler that discovers a single article discovers the entire machinery within one hop.&lt;br /&gt;
&lt;br /&gt;
=== The URL space is unbounded ===&lt;br /&gt;
&lt;br /&gt;
MediaWiki&amp;#039;s login link records where the visitor came from, so it can return them there afterwards. That means there is not one login URL — there is one for every page a visitor could have been on, multiplied by every query variant that page could have carried:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/w/index.php?title=Special:UserLogin&amp;amp;returnto=Special:Log/block&amp;amp;returntoquery=page=User:203.0.113.9&lt;br /&gt;
/w/index.php?title=Special:UserLogin&amp;amp;returnto=Special:PrefixIndex/User:198.51.100.4/&amp;amp;returntoquery=printable=yes&lt;br /&gt;
/w/index.php?title=Special:ListFiles&amp;amp;user=203.0.113.44&lt;br /&gt;
/w/index.php?printable=yes&amp;amp;title=User_talk:198.51.100.7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifiers such as &amp;lt;code&amp;gt;printable=yes&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;action=history&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;oldid=&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;diff=&amp;lt;/code&amp;gt; multiply the space again.&lt;br /&gt;
&lt;br /&gt;
The result is a small wiki presenting a mathematically infinite set of distinct URLs, almost none of which are worth indexing. A crawler cannot detect this. It sees new links indefinitely and keeps requesting them.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Factor !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| Special pages bypass the parser cache || Every request costs full PHP + SQL&lt;br /&gt;
|-&lt;br /&gt;
| Sidebar and footer link to Special pages || Crawlers reach them from any article&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;returnto&amp;lt;/code&amp;gt; encodes the previous page || One login URL per page, per query variant&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;printable&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;oldid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;diff&amp;lt;/code&amp;gt; || Multiplies every URL above&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Fixes ==&lt;br /&gt;
&lt;br /&gt;
Apply these in order. The first two take minutes and carry no risk. The last one is the only step that can break a working site.&lt;br /&gt;
&lt;br /&gt;
=== 1. robots.txt ===&lt;br /&gt;
&lt;br /&gt;
This is the single highest-value change and is recommended in MediaWiki&amp;#039;s own manual. Most installations never do it.&lt;br /&gt;
&lt;br /&gt;
Place the following at the &amp;#039;&amp;#039;&amp;#039;document root&amp;#039;&amp;#039;&amp;#039; of the domain — &amp;lt;code&amp;gt;/robots.txt&amp;lt;/code&amp;gt;, not inside &amp;lt;code&amp;gt;/w/&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User-agent: *&lt;br /&gt;
Disallow: /w/&lt;br /&gt;
Allow: /w/load.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Content under &amp;lt;code&amp;gt;/wiki/&amp;lt;/code&amp;gt; remains fully indexable. The machinery under &amp;lt;code&amp;gt;/w/&amp;lt;/code&amp;gt; stops being crawled.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; exception matters: that endpoint serves the site&amp;#039;s CSS and JavaScript. Search engines penalise pages they cannot render, so it must stay reachable.&lt;br /&gt;
&lt;br /&gt;
To exclude a specific crawler entirely — for example if the site&amp;#039;s content should not be used for AI training — add a matching block. Well-behaved crawlers publish their user-agent string and honour these directives:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User-agent: GPTBot&lt;br /&gt;
Disallow: /&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whether to do this is an editorial decision about the content, not a technical one.&lt;br /&gt;
&lt;br /&gt;
=== 2. Enable miser mode ===&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$wgMiserMode = true;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This setting exists specifically for this situation. It disables the most expensive special pages and serves cached results for the remainder instead of recomputing them on each request. Wikipedia runs with it enabled. On a small or medium wiki there is no meaningful downside.&lt;br /&gt;
&lt;br /&gt;
=== 3. Enable caching ===&lt;br /&gt;
&lt;br /&gt;
This is the underlying weakness, and fixing it is what makes the site resilient rather than merely less attractive to crawlers.&lt;br /&gt;
&lt;br /&gt;
By default MediaWiki regenerates every page from the database on every request. For logged-in users that is unavoidable. For anonymous visitors — which includes all crawler traffic — it is pure waste.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$wgMainCacheType   = CACHE_ACCEL;&lt;br /&gt;
$wgUseFileCache    = true;&lt;br /&gt;
$wgFileCacheDirectory = &amp;quot;$IP/cache&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File cache is the important one. It writes rendered HTML to disk and serves anonymous page views directly from it, skipping the parser and most database work. Crawler load typically falls by an order of magnitude.&lt;br /&gt;
&lt;br /&gt;
If the hosting account has Redis or Memcached available, point &amp;lt;code&amp;gt;$wgMainCacheType&amp;lt;/code&amp;gt; at it instead of &amp;lt;code&amp;gt;CACHE_ACCEL&amp;lt;/code&amp;gt;. Check with the hosting provider before assuming either is present.&lt;br /&gt;
&lt;br /&gt;
Confirm the installed MediaWiki version at &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; before applying cache settings — some options have been renamed or removed across releases, and the current manual for that specific version is authoritative.&lt;br /&gt;
&lt;br /&gt;
=== 4. Reject the worst URLs at the web server ===&lt;br /&gt;
&lt;br /&gt;
The first three steps handle every crawler that follows the rules. They do nothing about scrapers that rotate user-agent strings and route through residential proxy networks, which ignore &amp;lt;code&amp;gt;robots.txt&amp;lt;/code&amp;gt; entirely.&lt;br /&gt;
&lt;br /&gt;
Those requests have to be refused before PHP starts. In &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; at the document root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
RewriteCond %{HTTP_COOKIE} !(UserID|_session) [NC]&lt;br /&gt;
RewriteCond %{QUERY_STRING} (^|&amp;amp;)returnto= [NC,OR]&lt;br /&gt;
RewriteCond %{QUERY_STRING} title=Special(%3A|:)(ListFiles|Contributions|PrefixIndex|Log) [NC]&lt;br /&gt;
RewriteRule ^/?w/index\.php$ - [F,L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cookie condition is what makes this safe. Visitors who are logged in or hold an active session still reach these pages normally; only anonymous requests to the combinatorial URLs receive a 403.&lt;br /&gt;
&lt;br /&gt;
A 403 returned by mod_rewrite costs microseconds. A rendered &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; page costs a full application slot.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Test this rule before relying on it. An error in the cookie condition will lock legitimate users out of logging in. Verify that you can log in, edit, and view page history with the rule active.}}&lt;br /&gt;
&lt;br /&gt;
== Verifying the fix ==&lt;br /&gt;
&lt;br /&gt;
After deploying, confirm the change in the raw access logs rather than in a dashboard. Substitute the correct log path for the hosting account.&lt;br /&gt;
&lt;br /&gt;
Count requests to the script path over a recent window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
awk &amp;#039;$7 ~ /index\.php/&amp;#039; access_log | wc -l&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Break down response codes, looking for the disappearance of 508 and 503:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
awk &amp;#039;{print $9}&amp;#039; access_log | sort | uniq -c | sort -rn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Identify which clients are still reaching the script path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
awk -F&amp;#039;&amp;quot;&amp;#039; &amp;#039;$0 ~ /index\.php/ {print $6}&amp;#039; access_log | sort | uniq -c | sort -rn | head&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expect the total to fall sharply within a day, as crawlers re-read &amp;lt;code&amp;gt;robots.txt&amp;lt;/code&amp;gt; on their own schedule rather than immediately.&lt;br /&gt;
&lt;br /&gt;
=== Reading the user-agent results ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;One user-agent, high count, consistent format.&amp;#039;&amp;#039;&amp;#039; A declared crawler. Verify it before blocking — most major operators publish their address ranges, and a forged user-agent is common. Reverse DNS is not a reliable check on its own.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Several near-identical browser strings with similar counts, then a sharp drop-off.&amp;#039;&amp;#039;&amp;#039; Automation. Real browser populations do not distribute evenly across a handful of versions.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Many distinct IP addresses sending one request each.&amp;#039;&amp;#039;&amp;#039; A residential proxy pool. Blocking individual addresses will not work; the source rotates on every burst.&lt;br /&gt;
&lt;br /&gt;
== Common misconceptions ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;The pages already send &amp;lt;code&amp;gt;noindex&amp;lt;/code&amp;gt;, so crawlers leave them alone.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Recent MediaWiki versions do send &amp;lt;code&amp;gt;noindex,nofollow&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;Special:&amp;lt;/code&amp;gt; pages. That instructs a crawler not to index the result — but the request has already been made and the resources already spent by the time the header is read. Only &amp;lt;code&amp;gt;robots.txt&amp;lt;/code&amp;gt; prevents the request itself.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;We will block the offending IP addresses.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Effective against a single misbehaving crawler, useless against proxy pools. Each burst typically arrives from a different source, so blocking is permanently one step behind.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;The server needs more memory.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Occasionally true, usually not. A properly cached wiki serves this traffic comfortably within standard shared-hosting limits. Raising limits without fixing the cause postpones the outage rather than preventing it.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;This is an attack.&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Almost never. The overwhelming majority of these incidents are ordinary crawlers encountering a site that offers infinite expensive URLs. The request volume is usually modest — a few thousand requests spread over hours. What makes it fatal is cost per request, not request rate.&lt;/div&gt;</description>
			<pubDate>Wed, 02 Sep 2026 15:11:38 GMT</pubDate>
			<dc:creator>Docs admin</dc:creator>
			<comments>https://kb.acenet.us/Talk:W/index.php</comments>
		</item>
</channel></rss>