From: Brynjar Eide Date: Thu, 14 Apr 2016 17:56:10 +0000 (+0200) Subject: Increase MySQL client timeouts from 10 seconds X-Git-Tag: rec-4.0.0-alpha3~44^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c22b388662af82a49433c7a5642d5173d820d8aa;p=pdns Increase MySQL client timeouts from 10 seconds If a query runs for 10 seconds or more, the connection is killed from the client side. Bumping this timeout value to three minutes should hopefully be good enough for most situations, until a configurable option can be added. --- diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 4035e3c0b..367b49619 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -337,7 +337,7 @@ SMySQL::SMySQL(const string &database, const string &host, uint16_t port, const #endif #if MYSQL_VERSION_ID >= 50100 - unsigned int timeout = 10; + unsigned int timeout = 180; mysql_options(&d_db, MYSQL_OPT_READ_TIMEOUT, &timeout); mysql_options(&d_db, MYSQL_OPT_WRITE_TIMEOUT, &timeout); #endif