Page MenuHomePhabricator

Exceeding memory restrictions for some large queries
Closed, ResolvedPublic

Description

/var/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/ForwardCompatibility/Result.php: 180 - Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8388616 bytes)

URL: https://xtools.wmcloud.org/ec/en.wikisource.org/Xover

Also occasionally gives a blank page (as in completely empty html page). This may or may not be what happened in T395746.

I don't know if this is related to one specific tool, or exactly which limit is exceeded (as in, limit for one query? for what?). Though it's true trying to allocate 8GB of ram for one request is already weird.

Event Timeline

Alien333 renamed this task from Exceeding memory restrictions for some large queries. to Exceeding memory restrictions for some large queries.
Alien333 moved this task from Backlog to General / other on the XTools board.

This has also been happening on enwiki for the last few weeks affecting about the top 120+ high count editors.

It is not purely edit count related though as WikiOriginal-9 @ ~349,705 edits works but JJMC89 @ ~345,962 counts fails. My own @ ~516000 has reliably failed for weeks.

Alien333 changed the task status from Open to In Progress.Jul 10 2025, 2:16 PM
Alien333 triaged this task as Medium priority.

Hah! my fault *facepalm*. My fix for T396423: Top Edits for all namespaces fails with SQL error was time-safe, but I didn't take into consideration memory. In hindsight, limiting everything in PHP does mean putting everything in memory. The memory error happened when the getTopEdits returned boatloads of data, if I'm reading correctly. Thanks to the helpful WMF comments in T394372: Migrate clouddb* hosts to MariaDB 10.11, now we know that the problem wasn't the assignments but row_number having become reserved in MariaDB 10.7. Which means normally we've got an easy fix: going back to the earlier code and backticking row_number.

There we go, PR #552.
(Moved to TE not EC because the issue was with EC's embed of some TE.)
@MusikAnimal : given this is a prod error, might want to review this before the older PRs.

MusikAnimal moved this task from Pending deployment to Complete on the XTools board.