-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Daniel Barrett wrote:
It seems that one slow extension can bring MediaWiki to a halt. For example, if you define a <wait> tag that simply sleeps for 20 seconds, and you hit a page that contains it, no other MediaWiki pages can be served during those 20 seconds.
Other PHP pages on the same Apache server, however, work just fine during those 20 seconds, so I'd guess this is not an Apache or PHP configuration issue. Only MediaWiki pages are affected.
Although the <wait> tag is artificial, the situation is realistic. We have a parser tag that hits an external database, and when the connection is slow (for even ONE wiki page), no other wiki pages can be served.
This seems dangerous. What's happening, and what's the workaround? This is in 1.13.0. (And maybe it's my imagination, but the problem seemed less in 1.12.0.)
I did a quick test with this on my local wiki; it looks like it may be session-related.
If I preview a page with <wait>20</wait>, then go load something up in another tab in the same browser, it sits there waiting on both tabs. (Confirmed with Firefox 3 and Safari 3 on Mac OS X.)
If on the other hand I go load things up in another browser, there's no delay there.
If I disable cookies (thus removing session affinity), then a second tab in the same browser has no slowdown.
And indeed, it appears that PHP session files are by default locked to prevent multiple simultaneous accesses.
- -- brion