Page MenuHomePhabricator

timeout waiting for lock on Meta page with transclusions and #expr arithmetic
Closed, DeclinedPublic

Description

https://meta.wikimedia.org/wiki/List_of_Wikipedias_by_language_group consistently (at the moment) yields:

Sorry, the servers are overloaded at the moment.
Too many users are trying to view this page. Please wait a while before you try to access this page again.
Timeout waiting for the lock

Looking at its source, I see lots of template transclusion and #expr arithmetic. I'm guessing something about those is failing.

It seems to me that the error message is misleading too: I'm pretty sure it is not true that "too many users are trying to view this page", for this specific page.

Also, perhaps relatedly, https://meta.wikimedia.org/wiki/List_of_Wikipedias_by_language_family is currently consistently yielding an nginx error 504.

Reedy says "I believe the error is poolcounter related".


Version: 1.22.0
Severity: normal

Details

Reference
bz55416

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:13 AM
bzimport set Reference to bz55416.
bzimport added a subscriber: Unknown Object (MLST).

Yes, still an issue. I've just tried this, and got the same "timeout waiting for the lock". However, I have just tried this logged out, and it works fine. So it is evidently an interaction with some setting on my account:

Let's see -- the gadgets I have enabled on Meta are:

*Wikimedia Portal Preview: Adds a "Render HTML" utility to Project portals.

*CentralAuth Interlink Fixer: Turns the CentralAuth-related user account links (e.g. on Special:Log/rights) into actual interwiki links.

  • Hot Cat: easily add / remove / change a category on an image, with name suggestion.
  • "Ask a question" feature for the Wikimedia Foundation's Evaluation portal project

I can see that page, though I get these HTML comments in the output:

<!--
NewPP limit report
CPU time usage: 109.495 seconds
Real time usage: 112.215 seconds
Preprocessor visited node count: 607841/1000000
Preprocessor generated node count: 92476/1500000
Post‐expand include size: 293239/2048000 bytes
Template argument size: 157362/2048000 bytes
Highest expansion depth: 15/40
Expensive parser function count: 0/500
-->

<!-- Saved in parser cache with key metawiki:pcache:idhash:21143-0!*!0!!en!*!* and timestamp 20131026035642
-->
<!-- parser cache is expired, sending anyway due to pool overload-->

This explains why Andre did not see a problem. When I changed some of my Appearance preferences (to get a different set of parser options), I did see the error message described in comment 0. And when I went to the edit page and clicked Preview, the request timed out with a Wikimedia Foundation Error message.

I imported the page and the templates it uses into my test wiki then used the getText.php and parse.php maintenance scripts to get some profiling data. It seems that about 84% of parsing time is spent in Template:NUMBEROF/data, which contains a giant #switch, as does its indirect caller Template:NUMBEROFGROUP/data. Algorithmically, this is very, very inefficient.

Perhaps those templates could be implemented more efficiently in Lua, or the bot that updates them could be changed to generate the finished reports directly.

Asaf: Is this still a problem nowadays?

IvanFon subscribed.

Cannot reproduce. Firefox 50, Elementary OS 0.4, on meta.wikimedia.org (1.29.0). I got this in the HTML:

-- 
NewPP limit report
Parsed by mw1303
Cached time: 20161219000436
Cache expiry: 2592000
Dynamic content: false
CPU time usage: 6.076 seconds
Real time usage: 6.088 seconds
Preprocessor visited node count: 935986/1000000
Preprocessor generated node count: 0/1500000
Post‐expand include size: 351936/2097152 bytes
Template argument size: 223227/2097152 bytes
Highest expansion depth: 15/40
Expensive parser function count: 0/500
Lua time usage: 0.133/10.000 seconds
Lua memory usage: 1.27 MB/50 MB
-->

This is a few years old and doesn't seem to be an issue anymore. Maybe should be closed?