Last modified: 2014-04-29 16:26:44 UTC
We run a fairly large corporate Wiki (150k+ users) using mediaWiki v1.17, PHP 5.2.6 on a WAMP stack. We notice that sometimes jobs that are executed on the command line (using the PHP passthru command) get stuck. These jobs include: - Image thumbnailing (ImageMagick) - PDF generating (using an extension and external PDF generator) - Math conversion (LaTex) The cause and symptoms are as follows: - 2 command line jobs are requested at more or less the same time - One of the jobs hangs: Taskmanager will show 'cmd'and 'convert' jobs that never finish, and one of Apache's worker threads will remain in W state. - More jobs get requested and will get stuck as well, to the point where all Apache worker threads are locked. I can reliably reproduce this issue in our test environment. The bug appears to be caused by a known PHP issue: https://bugs.php.net/bug.php?id=44942 A workaround for this bug has been tested: we have modified includes/GlobalFuncitons.php with the suggested fix, that is: call session_write_close() before calling passthru(), and calling session_start() afterwards. Given that this is a (long-standing) PHP bug, is this something that should be fixed in the MediaWiki core code? At this time, it appears to be our only option.
To reproduce: 1) Open 2 browser windows to your Wiki (when MediaWiki is hosted on multiple servers, make sure both browsers point at the same server) 2) Edit a different article in each of the browsers (or create new test articles) 3) Add an (existing) image to each of the articles, specify a thumbnail or resize for these images. 4) Hit Preview or Submit on both browsers at the same time (within 1 second of each other) 5) One or both browser windows will fail to load. On the server, there will be a stuck cmd.exe and/or convert.exe job in Taskmgr. To clear this error, bounce Apache.
Have you tried reproducing this with something newer than MW 1.17?
Ronald In 't Velt: Does this still happen in a supported version of MediaWiki (preferably 1.22)? No news in mentioned upstream ticket in https://bugs.php.net/bug.php?id=44942 Adding bug 41371 as blocked as it's an issue with thumbnailing.