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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3707%2Fhead;p=thirdparty%2Fpdns.git 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 4035e3c0b4..367b496190 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