[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] Manticore - query retry when persistent connection is gone
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]> Fri, 03 Jul 2026 11:57:18 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a47a39e364e8_3819a71c987b4@gitlab-sidekiq-low-urgency-cpu-bound-v2-69d694bf94-bjgr4.mail> |
Victor Emanouilov pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
27efb6b8 by Victor Emanouilov at 2026-07-03T14:57:12+03:00
[FIX] Manticore - query retry when persistent connection is gone
- - - - -
1 changed file:
- lib/core/Search/Manticore/PdoClient.php
Changes:
=====================================
lib/core/Search/Manticore/PdoClient.php
=====================================
@@ -599,10 +599,18 @@ class PdoClient
}
}
- protected function query($sql)
+ protected function query($sql, $tries = 0)
{
$this->debug($sql);
- return $this->pdo->query($sql);
+ try {
+ return $this->pdo->query($sql);
+ } catch (PDOException $e) {
+ if (strstr($e->getMessage(), "server has gone away") && $tries < self::QUERY_RETRIES) {
+ $this->connect(true);
+ return $this->query($sql, $tries + 1);
+ }
+ throw new Exception($e->getMessage());
+ }
}
protected function prepareAndExecute($sql, $params = [])
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/27efb6b8a93954b4bd94ef0927bf1b6e0df8530d
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/27efb6b8a93954b4bd94ef0927bf1b6e0df8530d
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs