]> granicus.if.org Git - pdns/commitdiff
Increase MySQL client timeouts from 10 seconds
authorBrynjar Eide <github@segfault.no>
Thu, 14 Apr 2016 17:56:10 +0000 (19:56 +0200)
committerBrynjar Eide <github@segfault.no>
Thu, 14 Apr 2016 17:56:10 +0000 (19:56 +0200)
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.

modules/gmysqlbackend/smysql.cc

index 4035e3c0b47f980d6ae34b9de42a122a738c99a8..367b496190ce14835b37bc2427e0954f9143e426 100644 (file)
@@ -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