Page MenuHomePhabricator

PHP Warning: geoip_country_code_by_name(): Required database not available at /usr/share/GeoIP/GeoIP.dat.
Closed, ResolvedPublic2 Estimated Story PointsPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Warning: geoip_country_code_by_name(): Required database not available at /usr/share/GeoIP/GeoIP.dat.
exception.trace
from /srv/mediawiki/php-1.38.0-wmf.21/extensions/FundraiserLandingPage/includes/specials/FundraiserRedirector.php(41)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.38.0-wmf.21/extensions/FundraiserLandingPage/includes/specials/FundraiserRedirector.php(41): geoip_country_code_by_name(string)
#2 /srv/mediawiki/php-1.38.0-wmf.21/includes/specialpage/SpecialPage.php(671): FundraiserRedirector->execute(NULL)
#3 /srv/mediawiki/php-1.38.0-wmf.21/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run(NULL)
#4 /srv/mediawiki/php-1.38.0-wmf.21/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#5 /srv/mediawiki/php-1.38.0-wmf.21/includes/MediaWiki.php(903): MediaWiki->performRequest()
#6 /srv/mediawiki/php-1.38.0-wmf.21/includes/MediaWiki.php(563): MediaWiki->main()
#7 /srv/mediawiki/php-1.38.0-wmf.21/index.php(53): MediaWiki->run()
#8 /srv/mediawiki/php-1.38.0-wmf.21/index.php(46): wfIndexMain()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}
Notes
  • Exclusively happening on dontate wiki
  • Roughly happening twice an hour
  • Looks new with wmf.21

Details

MediaWiki Version
1.38.0-wmf.21
Request URL
https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?rdfrom=*

Event Timeline

+ @Pcoombe as fyi. I'm discussing this with fr-tech in IRC.

DStrine lowered the priority of this task from High to Medium.
DStrine moved this task from Triage to Sprint +1 on the Fundraising-Backlog board.

@Pcoombe mentioned in IRC that this is only happening a couple of times an hour, and that he got correctly geolocated (I assume by the varnish server?) when visiting donatewiki in incognito mode.

So this isn't a big donor impact, but we should stop throwing production errors. Maybe add a try/catch or just remove the php-side geolocation altogether.

@Ejegg I don't know anything about how often it's happening (although twice per hour was in the task description) but can confirm I haven't been able to reproduce when visiting donatewiki in Incognito

Change 769817 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/FundraiserLandingPage@master] Stop falling back to server-side GeoIP lookup

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

Change 769817 abandoned by Ejegg:

[mediawiki/extensions/FundraiserLandingPage@master] Stop falling back to server-side GeoIP lookup

Reason:

Seems like a very rare issue

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

Change 769817 restored by Ejegg:

[mediawiki/extensions/FundraiserLandingPage@master] Stop falling back to server-side GeoIP lookup

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

Change 769817 merged by jenkins-bot:

[mediawiki/extensions/FundraiserLandingPage@master] Stop falling back to server-side GeoIP lookup

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

DStrine set the point value for this task to 2.