MediaWiki Troubleshooting

From DreamHost
Jump to: navigation, search

It's hard to imagine that our favorite wiki would be subject to the problems of high usage, but it happens (although rarely, thankfully).

MediaWiki recommends trying out Memcached. Unfortunately, DreamHost does NOT support memcached! Guarantia Data lets each user get a free 20MB data bucket, you can use that if you'd like.

If MediaWiki is still using a lot of resources, it could be that your wiki has become very popular. While our shared hosting servers are very good at handling quite a bit of traffic from our customers, there does come a point sometimes where a site will outgrow shared hosting and need to move onto the next step - a shiny new Dedicated server!

How to use MediaWiki successfully in a shared environment

THIS IS NOT THE BEST SOLUTION FOR VPS AND PRIVATE SERVER CUSTOMERS!! See Performance tuning.

First, create a cache directory under your wiki's directory, e.g. "caches".

Add the following to your LocalSettings.php to lessen the strain on your wiki:

// By Aaron Schulz, edited for DreamHost users by Jeffw of DreamHost/Jeff of MyWikis.com
# Shared memory settings
$wgMainCacheType = CACHE_DB;
$wgCacheDirectory = "$IP/caches";
$wgUseLocalMessageCache = true;
$wgParserCacheType = CACHE_ANYTHING;
$wgMemCachedServers = array(); // Add memcached servers here
$wgUseGzip = true;
$wgDisableOutputCompression = true;
$wgEnableSidebarCache = true;

# NO DB HITS!
$wgDisableCounters = true;
$wgMiserMode = true;

# Text cache
$wgCompressRevisions = true; // DO NOT USE if you have Extension:Replace Text
$wgRevisionCacheExpiry = 3*24*3600;
$wgParserCacheExpireTime = 14*24*3600;

How to use MediaWiki successfully in a private environment

This will not work on a shared environment! Enable XCache, then copy the above. Find the line that says: $wgMainCacheType = CACHE_DB; and change it to $wgMainCacheType = CACHE_ACCEL;.