Last modified: 2011-04-30 01:20:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22041, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20041 - RSS/ATOM Feeds / Endless Loop in includes/diff/DifferenceEngine.php(1258) : Fatal error - Maximum execution time of 30 seconds exceeded
RSS/ATOM Feeds / Endless Loop in includes/diff/DifferenceEngine.php(1258) : F...
Status: RESOLVED DUPLICATE of bug 7601
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.15.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://wiki.rhein-neckar.de/index.php...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-02 17:29 UTC by Raphael Eiselstein
Modified: 2011-04-30 01:20 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raphael Eiselstein 2009-08-02 17:29:22 UTC
Every request to our RSS/ATOM fires one apache child to 100% CPU for 30 seconds before PHP's maximum execution time of 30sec kills includes/diff/DifferenceEngine.php

Our error.log shows hundreds of lines (read: hundreds of minutes) every day like
includes/diff/DifferenceEngine.php(1257) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1257) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1264) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1248) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1261) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1258) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1258) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1257) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1261) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1256) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1257) : Fatal error - Maximum execution time of 30 seconds exceeded
includes/diff/DifferenceEngine.php(1257) : Fatal error - Maximum execution time of 30 seconds exceeded

The lines differ from about 1248 to 1264 with a stress on 1257.

You may reproduce this by using wget for example:
-----------------
$ time wget --no-proxy -O /dev/null "http://wiki.rhein-neckar.de/index.php?title=Spezial:Letzte_Änderungen&feed=rss"
--2009-08-02 19:10:22--  http://wiki.rhein-neckar.de/index.php?title=Spezial:Letzte_%C4nderungen&feed=rss
Resolving wiki.rhein-neckar.de... 62.138.134.203
Connecting to wiki.rhein-neckar.de|62.138.134.203|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2009-08-02 19:10:52 ERROR 500: Internal Server Error.


real    0m30.127s
user    0m0.000s
sys     0m0.006s
-----------------

The server's CPU is a "Dual Core AMD Athlon(tm) 64 X2 Dual Core Processor 4200+" which should be more than adequate for a single instance mediawiki.

I expect we had this problem before 1.13, we had it for 1.14.0 and now with 1.15.1.

Please check http://wiki.rhein-neckar.de/index.php/Spezial:Version for installed extensions on our wiki.

If you need more detailed informationen (configuration), please ask!
If you want me to apply patches for testing/profiling/debugging, ... please ask!
If you expect inconsistent data in out database, please send me some checkscripts.


TIA
Raphael Becker
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-08-02 17:32:13 UTC
Try using the wikidiff2 extension for diffs instead of the PHP-based diff engine.
Comment 2 Raphael Eiselstein 2009-08-02 17:58:30 UTC
(In reply to comment #1)
> Try using the wikidiff2 extension for diffs instead of the PHP-based diff
> engine.

Thanks for you quick reply.

According to http://www.mediawiki.org/wiki/Extension:Wikidiff2 this extension is declared "experimental". 
We need try this later, I don't have any root access to this server and therefore cannot modify the PHP setup on this server. 

I haven't seen this error on many other wikis I care of, so I guess there's nothing wrong with this piece of code in general (many other might have reported this before).

Regards
Raphael Becker
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-08-02 18:06:20 UTC
wikidiff2 is what Wikipedia uses, IIRC.  The built-in diff engine is very CPU-intensive, since it's written in PHP.  I'd assume that the RSS feed link is trying to generate a large number of diffs and simply takes too long.  I don't know if this is fixable without using a diff engine written in a faster language, like wikidiff2.
Comment 4 Brion Vibber 2009-08-03 16:29:19 UTC
I could have sworn there was a dupe bug entry but can't find it.

The slow-diffs-breaking-things problem is old and well known, but we don't have a very good fix for it at the moment for those encountering it other than disabling feed diffs or installing the C++ differ.

What we need here is the ability for the diff class to abort itself cleanly when it's taking too long, allowing for graceful degradation -- skip the slow diffs and just show everything else.

Comment 5 Chad H. 2009-08-04 22:27:00 UTC

*** This bug has been marked as a duplicate of bug 7601 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links