[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] Manticore - query retry when persistent connection is gone
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]> Fri, 03 Jul 2026 11:57:06 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a47a39280bea_388b7748772e9@gitlab-sidekiq-low-urgency-cpu-bound-v2-69d694bf94-84n9s.mail> |
Victor Emanouilov pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki
Commits:
81d6bddd by Victor Emanouilov at 2026-07-03T14:57:01+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/81d6bddd826240bd2143a70c6a2794deb406524e
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/81d6bddd826240bd2143a70c6a2794deb406524e
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