Talk:Featured Images/Apr-Jun 2017

From OpenStreetMap Wiki
Jump to: navigation, search

Missing link

I'm trying to see the details of a image, but the link on the image link to this page no to the image page. --Wille (talk) 15:36, 9 July 2017 (UTC)

There's an annoying MediaWiki bug on this wiki (causing performance problems or data not being displayed). It's not easy to fix. For some strange reason, the template expansion explodes and is not being cached as it should be for some dates. This bug has become more severe since MediaWiki 1.28. I'm already trying to fix that by looking at what causes these unexpected giant expansions (which does not occur on every page, and does not affect how a single featured image is displayed on the home page or elsewhere).
This instance of MediaWiki has problems in using the template expansion cache; this cache is visibly not working and causes the identical template invokations (with exactly the same parameters) to be parsed and expanded multiple times without reusing the result of their evaluation and without using "lazy expansion" as it should and which is part of core MediaWiki code since long).
The parser statistics (visible in generated HTML comments are very intrigating). Testing the same contents on a Wikimedia Labs test server (with the same MediaWiki version) does not show the same statistics (they're far better in Wikimedia Labs, note that I ignore CPU time I'm interested only in volume counters: parser nodes, pre and post-include sizes, number of expansions).
I've already split some existing template into several parts (to better isolate it). This seems to be related to the increase in the number of available translations with more translators active, and past some internal threshold, we have a "shortcut" in the code which causes the invalidation of existing caches: this may be related to insufficiaet virtual memory on the server, or a bug in the current PHP version used here, probably in its garbage collector, causing too agressive purge of "weak data references" that should not be purged in the background, or some incorrect configuration of the PHP server or some internal PHP settings for MediaWiki; I know that there's also incorrect settings for the installation of the local MySQL database). Wikimedia servers are better because they are in larger clouds with better performing servers, with more mory, they have better performing SQL engines (also running MariaDB instead of MySQL, a better PHP engine, and much faster disk storages with larger caches). That's why I think it's related to the use of "weak references" in MediaWiki's PHP code: the same parsing is executed multiple times on this wiki, cached results are not kept, the parser counters explode rapidly: memory seems to have exploded but in fact it has been garbage-collected multiple times and reallocated to perform again the same parsing (possibly this wiki is also not configured to use on-disk cache, but only in-memory cache, but there's not enough memory on this server to support that, or on-disk caches are too small... or disks for them are full, used by something else such as error logs).
Probably we'll need to create dedicated pages for distinct languages, that won't try to display all translations, but just a selected subset (including language fallbacks, the last fallback being English in all languages).
Verdy_p (talk) 16:18, 9 July 2017 (UTC)
Unfortunately, this wiki lacks the regular presence of qualified tech-admins with enough privileges to inspects error logs (I'm sure they are now full with tons of messages since MW 1.28), and enough technical knowledge to check its installation/settings and run/schedule maintenance scripts. We have very little diagnostic tools to see what's really not working as expected and find workarounds. I would suggest to the OSM Foundation to give an authorization to some wellknown and volunteer Wikimedia tech-admin (with a signed agreement related to privacy and security and independance of the projects, and communicating with the Foundation if there's a problem that would require changing the contents) to see what's not going correctly on this wiki, find accurate fixes and schedule them correctly to minimize downtimes.Verdy_p (talk) 21:00, 9 July 2017 (UTC)
The recent expansion size and performance problem (since early June with MediaWiki 1.28 deployed) is solved. It was not really because of {{LangSwitch}}, but unneeded multiple expansion of translated descriptions templates with distinct parameters (for cases with missing translations), and a new stricter logic in Mediawiki 1.26+ to ignore cached template expansion results.
Normally the old "trimenglish" trick is no longer needed at all in description templates (I'll test it soon on a single description, if it really works, this English-specific logic can be removed as it confuses translators. — Verdy_p (talk) 19:21, 10 July 2017 (UTC)