Page MenuHomePhabricator

MediaWiki has issues deleting/moving multiple pages with PHP 5.5.0
Closed, InvalidPublic

Description

MediaWiki has trouble moving or deleting multiple pages when using Apache PHP 5.5.0. Severe server job process rates are common and timeouts occur frequently.

The error can be easily replicated as follows (for deleting pages):

  1. Open up two or three tabs with pages you wish to delete.
  2. Delete one of the pages.
  3. Attempt to delete the other two pages soon afterwards.

The first page will delete normally, but the following pages will take a long time to process, though if one closes out of the browser and checks the recent changes list, the deletions worked normally.

As a side effect of this error, MediaWiki itself becomes highly unresponsive if you attempt to go to another tab with another MediaWiki instance.

I believe the error may be caused by an irregularity in how jobs are queued and processed in PHP 5.5 that doesn't not work properly with stock MediaWiki settings.

This bug was discovered while running a Windows XAMPP stack with the following installed:

Apache PHP 5.5.0 (apache2handler)
MySQL 5.6.11
MediaWiki 1.22.0


Version: unspecified
Severity: major
OS: Windows 7
Platform: PC

Details

Reference
bz58532

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:25 AM
bzimport set Reference to bz58532.
bzimport added a subscriber: Unknown Object (MLST).

Jobs are handled mostly by database, not PHP (unless you've configured it to use Redis). Did you upgrade other parts of the stack along with PHP?

I tried rolling back to MySQL 5.5 with the same PHP version, got the same errors.

I reverted to XAMPP 1.8.2 (I was using 1.8.3), which has the following:

PHP - 5.4.19 (apache2handler)
MySQL - 5.5.32

It works properly with this configuration.

I have set up an independent, non XAMPP PHP 5.5 instance with both versions of MySQL (using an XML dump of my localhost testing wiki) mentioned above, and the same problems with deleting/moving multiple page happened when using PHP 5.5.

I thought it was a database issue myself, but based on my tests, I believe it's a PHP error involving how it processes queued jobs request for the database backend.

Set $wgJobRunRate to 0. If its job queue related (running them anyhow, queuing them seems less likely to be a problem) that should stop the issue (at expense of screwing up jobs. Not a solution just a thing to figure out if it is indeed the job queue messing things up)

Also these are normal pages, not image pages you are moving/deleting?

Already tried setting the Job rate to 0, no apparent change.

And yes, I have attempted deleting normal pages.

What makes you think this has anything to do with the job queue?

Also, if you have logging set up on mysql, could you check if mediawiki is doing any really slow queries?

I'd have to set up the same settings I had before to reproduce the bug.

As for the job queue, that's my best guess. I'm not a PHP nor MySQL expert, but from what little I do know, everytime you move or delete a page, a php script creates a job to make that change to the database, and it seems on the settings I described it gags trying to run more than one job at once and the job queue seems to clear really slowly.

The error I described could have been unique to myself (I use XAMPP, which is largely preconfigured and may have had settings altered in the my.ini or php.ini that caused the issue).

I think, this was a specific problem of the PHP5.5.0 (released 20.06.2013), which was the frist version with the integrated ZEND opcdoe fetch.

When using that version under Linux, I observed segment faults, and the quick release of the bug-fix version PHP5.5.1 (18.07.2013) and its change log shows, that I was no alone:

See Change log to 5.5.1 http://www.php.net/ChangeLog-5.php#5.5.1 .

I would strongly suggest not to invest in any bugs with PHP 5.5.0 - this was not a stable and reliable PHP version -> closing this bug as invalid, because it is based on a PHP version which is known as unreliable.

@ arcane@live.com : please upgrade to PHP 5.5.7.

@ arcane@live.com : pls. feel free to reopen this bug, if the problem exists also with PHP 5.5.7.

(In reply to comment #7)

I would strongly suggest not to invest in any bugs with PHP 5.5.0 - this was
not a stable and reliable PHP version -> closing this bug as invalid, because
it is based on a PHP version which is known as unreliable.

Can someone please add a check to the installer (and possibly the bootstrap code) so that this is flagged up to anyone who attempts to install/use MediaWiki on 5.5.0?