From 9305a8bfe5d23850ab521faf8d1fd5e414e037c7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 26 Jan 2015 12:09:58 +0200 Subject: Close #3509 Not really a bug, but ... --- system/database/drivers/mysqli/mysqli_driver.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'system/database/drivers') diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 898f80e37..d16c98a68 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -125,6 +125,10 @@ class CI_DB_mysqli_driver extends CI_DB { $client_flags = ($this->compress === TRUE) ? MYSQLI_CLIENT_COMPRESS : 0; $mysqli = mysqli_init(); + $mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 10); + $mysqli->options(MYSQLI_OPT_READ_TIMEOUT, 5); + $mysqli->options(MYSQLI_OPT_RECONNECT, 1); + if ($this->stricton) { $mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode="STRICT_ALL_TABLES"'); -- cgit v1.2.3-24-g4f1b