Extreme slowness for unregistered users


This issue was patched in the SVN code. Host lookup will be configurable in future releases of Wikka 1.2.

Symptoms

For unregistered visitors the Wikka site is very slow while registered (logged-in) visitors don't have any problem. May also cause "Fatal error: Maximum execution time of 30 seconds exceeded in [path]\libs\Wakka.class.php on line 1848".

Cause

By default, Wikka does a DNS name lookup for the node an unregistered user is connecting form. If the DNS lookup from the server is slow, this will result in very long response times. For logged-in users such a lookup doesn't take place, so they don't experience such slowness.

Applies to

All current Wikka versions.

Solution

will follow

A patch that DrPain posted in the comments of this page that works for most Wikka versions to force it to stop checking DNS for hostnames first is to find in /libs/Wakka.class.php the section:

 function GetUserName() { if ($user = $this->GetUser()) $name = $user["name"]; else if (!$name = gethostbyaddr($_SERVER["REMOTE_ADDR"])) $name = $_SERVER["REMOTE_ADDR"]; return $name; }

and change it to:

 function GetUserName() { if ($user = $this->GetUser()) $name = $user["name"]; else $name = $_SERVER["REMOTE_ADDR"]; return $name; }


CategoryWorkaround
There are 6 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki