From 48cff1f955ab8d6f42eb8e9f7d65040821ea9ea4 Mon Sep 17 00:00:00 2001 From: Mostafa Abdelraouf Date: Fri, 29 Jul 2022 13:58:25 -0500 Subject: [PATCH] Slightly more light weight health check (#100) --- .circleci/pgcat.toml | 2 +- src/pool.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/pgcat.toml b/.circleci/pgcat.toml index eca8f67..1c0c010 100644 --- a/.circleci/pgcat.toml +++ b/.circleci/pgcat.toml @@ -14,7 +14,7 @@ port = 6432 # How long to wait before aborting a server connection (ms). connect_timeout = 100 -# How much time to give `SELECT 1` health check query to return with a result (ms). +# How much time to give the health check query to return with a result (ms). healthcheck_timeout = 100 # For how long to ban a server if it fails a health check (seconds). diff --git a/src/pool.rs b/src/pool.rs index eab3330..775c8d4 100644 --- a/src/pool.rs +++ b/src/pool.rs @@ -328,7 +328,7 @@ impl ConnectionPool { match tokio::time::timeout( tokio::time::Duration::from_millis(healthcheck_timeout), - server.query("SELECT 1"), + server.query(";"), ) .await {