Page MenuHomePhabricator

MWException: Parsoid resources limit exceeded: wt2html: wikitextSize limit exceeded
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   MWException: Parsoid resources limit exceeded: wt2html: wikitextSize limit exceeded
exception.trace
from /srv/mediawiki/php-1.40.0-wmf.14/extensions/DiscussionTools/includes/Hooks/HookUtils.php(128)
#0 /srv/mediawiki/php-1.40.0-wmf.14/extensions/DiscussionTools/includes/ApiDiscussionToolsPageInfo.php(65): MediaWiki\Extension\DiscussionTools\Hooks\HookUtils::parseRevisionParsoidHtml(MediaWiki\Revision\RevisionStoreRecord)
#1 /srv/mediawiki/php-1.40.0-wmf.14/includes/api/ApiMain.php(1903): MediaWiki\Extension\DiscussionTools\ApiDiscussionToolsPageInfo->execute()
#2 /srv/mediawiki/php-1.40.0-wmf.14/includes/api/ApiMain.php(878): ApiMain->executeAction()
#3 /srv/mediawiki/php-1.40.0-wmf.14/includes/api/ApiMain.php(849): ApiMain->executeActionWithErrorHandling()
#4 /srv/mediawiki/php-1.40.0-wmf.14/api.php(90): ApiMain->execute()
#5 /srv/mediawiki/php-1.40.0-wmf.14/api.php(45): wfApiMain()
#6 /srv/mediawiki/w/api.php(3): require(string)
#7 {main}
Impact
Notes

The wt2html: wikitextSize limit exceeded is also mentioned in T286355: Templates expanding to mapframe extensions with large bodies exceed wikitext limits. This one looks slightly different since the two occurrences I found are coming from action API entrypoint discustoolspageinfo

Another example URL is https://es.m.wikipedia.org/wiki/Usuario_discusi%C3%B3n:Kizar

We had some from before deploying 1.40.0-wmf.14.

Details

Request URL
https://fi.wikipedia.org/w/api.php?action=discussiontoolspageinfo&format=*&formatversion=*&oldid=*&page=*&uselang=*

Event Timeline

Before engaging on "what should we do with the limit size for wikitext parse", I think it would be useful to at least collect some metrics around that to understand how often it happens and how we want to handle it. What do you think @ihurbain, @ssastry, and @cscott?

Change 947010 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/DiscussionTools@master] Handle Parsoid resource limit exceeded exceptions

https://gerrit.wikimedia.org/r/947010

Arlolra triaged this task as Medium priority.Aug 8 2023, 9:19 PM
Arlolra moved this task from Backlog to Code Review on the Content-Transform-Team-WIP board.

Change 947010 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Handle Parsoid resource limit exceeded exceptions

https://gerrit.wikimedia.org/r/947010

These days, the message to search was RuntimeException: Parsoid resources limit exceeded: wt2html: wikitextSize limit exceeded. I don't see that yet in 1.41.0-wmf.22 but there were only 66 occurrences in the last month.