diff --git a/src/Appwrite/Extend/PDO.php b/src/Appwrite/Extend/PDO.php index fce9165b4e..732f745977 100644 --- a/src/Appwrite/Extend/PDO.php +++ b/src/Appwrite/Extend/PDO.php @@ -61,6 +61,8 @@ class PDO extends PDONative public function reconnect() { + sleep(3); + $this->pdo = new PDONative($this->dsn, $this->username, $this->passwd, $this->options); // Connection settings diff --git a/src/Appwrite/Extend/PDOStatement.php b/src/Appwrite/Extend/PDOStatement.php index 63685d7cc4..d41b028ab0 100644 --- a/src/Appwrite/Extend/PDOStatement.php +++ b/src/Appwrite/Extend/PDOStatement.php @@ -49,8 +49,6 @@ class PDOStatement extends PDOStatementNative try { $result = $this->PDOStatement->execute($input_parameters); } catch (\Throwable $th) { - // throw new Exception('My Error: ' .$th->getMessage()); - sleep(1); $this->pdo->reconnect(); $result = $this->PDOStatement->execute($input_parameters); }