Last modified: 2013-10-23 18:17:22 UTC
Created attachment 10405 [details] Valgrind compatible profile data from XDebug Hi, I fixed this problem, but it was difficult to diagnose. I configured my MediaWiki installation to cache using memcached. Unfortunately I set the port to find memcached on incorrectly (11212 instead of 11211). The end result was that it took 10 seconds to load a page. I couldn't find any errors in the logs, even though I turned on debug logging. Eventually I installed XDebug and profiled the code. The result can be seen in the attachment. Basically all the time is being spent in the php::sleep function inside of MessageCache->lock. Obviously, this was a misconfiguration error on my part, but it would be nice if the error was detected and logged somehow. Anyway, thanks for all the hard work on a great project! Matt
Shouldn't we just throw an exception if we can't connect to memc?
There is a timeout on connections to memcahed, and it defaults to 0.1...
(In reply to comment #2) > There is a timeout on connections to memcahed, and it defaults to 0.1... Also, with debugging set, there is: if ( !$sock ) { if ( $this->_debug ) { $this->_debugprint( "Error connecting to $host: $errstr\n" ); } return false; } Which would have been enabled if you had set $wgMemCachedDebug to true... Almost a WFM
So maybe I misunderstood how to resolve these types of issues. I didn't go through the steps here http://www.mediawiki.org/wiki/Manual:How_to_debug I assumed that errors would be logged to the apache log and I set the apache log level to debug. Was I mistaken?
(In reply to comment #4) > I assumed that errors would be logged to the apache log and I set the apache > log level to debug. Was I mistaken? probably would help if you set $wgDebugLogFile
Thanks for the help. Sorry for the bother.