Some technical stuff about this wiki

From Red House Wiki
Jump to: navigation, search

Constrained by PHP and MySQL versions, this mediawiki install was 1.24.6.

It quite quickly developed confusing and intermittent Waiting (TTFB) delays associated with load.php on the scale of minutes!

7 things didn't sort this out;

  • changing php extension queries from old mysql to mysqli
  • sounds obvious, but make sure any extension tables you're using in the database are set up the same as the mediwiki ones (INNODB, binary - default collation etc) so you can use foreign keys instead of adding unnecessary complications to stored procedures etc
  • in LocalSettings.php:
remove all extensions, purge and see if anything changed
  • use some sort of cache and minimise update queries, e.g. in LocalSettings.php:
    • comment out $wgMainCacheType and $wgMemCachedServers
    • put in -
      • $wgUseFileCache = true;
      • $wgFileCacheDirectory = "$IP/cache";
      • $wgShowIPinHeader = false;
      • $wgEnableSidebarCache=true;
      • $wgDisableCounters = true;
      • $wgMiserMode = true;
make sure your cache folder is writable.
  • cache the load.php stuff too, in LocalSettings.php:
put in -
$wgResourceLoaderMaxage = array(
'versioned' => array(
'server' => 30 * 24 * 60 * 60, // 30 days
'client' => 30 * 24 * 60 * 60, // 30 days
),
'unversioned' => array(
'server' => 30 * 24 * 60 * 60, // 30 days
'client' => 30 * 24 * 60 * 60, // 30 days
),
);
  • a robot.txt to dissuade too much crawling
  • in LocalSettings.php:
use $wgDBserver = "database IP address here"; i.e. NOT its name
this seemingly bypasses a load of bouncing around which can drastically slow down load times


But, the only thing I've really learned so far is that the delay shows a clear correlation with the number of active connections on the server. No problem at all when this is low, but the wiki quickly becomes unusable as it increases.

Turned out it wasn't the wiki at all. It was someone hogging bandwidth/denial of service attacks on the server ... grrr.

Related Pages

 User:Gav Personal Recommendations Why I think a wiki would be good for the school
 Privacy Bottom-up Tacit Knowledge
 Collaborative filtering Filter bubbles Category:Experiments
 File:CTF-clicking.jpg Expats Gallery Simple population model