Page MenuHomePhabricator

HHVM default configuration kills queries after one minute, disable that
Closed, ResolvedPublic

Description

(on terbium)

<?php
$db = new mysqli('db1053.eqiad.wmnet', 'root', '');
$db->query('SELECT sleep(100)');
?>
[Thu Nov 26 13:14:40 2015] [hphp] [9015:7f5ee93b2d00:0:000001] [] SlowTimer [59996ms] at runtime/ext_mysql: slow query: SELECT sleep(100)

Or with MediaWiki stack:

hashar@terbium:~$ mwscript sql.php --wiki=aawiki
> SELECT sleep(100);

[Thu Nov 26 12:22:16 2015] [hphp] [32400:7fa1daecdd00:0:000001] [] SlowTimer [59999ms] at runtime/ext_mysql: slow query: SELECT /* DatabaseBase::query  */ sleep(100)
# Wait some more...
[Thu Nov 26 12:23:16 2015] [hphp] [32400:7fa1daecdd00:0:000002] [] SlowTimer [59999ms] at runtime/ext_mysql: slow query: SELECT /* DatabaseBase::query  */ sleep(100)
exception 'DBQueryError' with message 'A connection error occured. 
Query: SELECT sleep(100)
Function: DatabaseBase::query
Error: 2013 Lost connection to MySQL server during query (10.64.16.27)
' in /srv/mediawiki/php-1.27.0-wmf.7/includes/db/Database.php:1090
Stack trace:
#0 /srv/mediawiki/php-1.27.0-wmf.7/includes/db/Database.php(1047): DatabaseBase->reportQueryError()
#1 /srv/mediawiki/php-1.27.0-wmf.7/maintenance/sql.php(143): DatabaseBase->query()
#2 /srv/mediawiki/php-1.27.0-wmf.7/maintenance/sql.php(134): MwSql->sqlDoQuery()
#3 /srv/mediawiki/php-1.27.0-wmf.7/maintenance/doMaintenance.php(103): MwSql->execute()
#4 /srv/mediawiki/php-1.27.0-wmf.7/maintenance/sql.php(178): include()
#5 /srv/mediawiki/multiversion/MWScript.php(97): include()
#6 {main}
>

Event Timeline

jcrespo created this task.Nov 26 2015, 12:25 PM
jcrespo updated the task description. (Show Details)
jcrespo raised the priority of this task from to Unbreak Now!.
jcrespo added projects: Operations, DBA.
jcrespo added subscribers: jcrespo, Joe, hashar.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 26 2015, 12:25 PM
hashar updated the task description. (Show Details)Nov 26 2015, 12:26 PM
hashar set Security to None.
jcrespo updated the task description. (Show Details)Nov 26 2015, 12:26 PM
hashar updated the task description. (Show Details)Nov 26 2015, 12:38 PM
jcrespo updated the task description. (Show Details)Nov 26 2015, 1:15 PM
jcrespo added a comment.EditedNov 26 2015, 1:30 PM

But we have already:

hhvm.mysql.slow_query_threshold = 10000

Edit: that is for logging only, ignore.

Joe claimed this task.Nov 26 2015, 2:06 PM

Change 255538 had a related patch set uploaded (by Giuseppe Lavagetto):
terbium: set hhvm mysql read timeout to 1 day

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

Change 255538 merged by Jcrespo:
terbium: set hhvm mysql read timeout to 1 day

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

Joe closed this task as Resolved.Nov 26 2015, 2:16 PM