Slightly more light weight health check (#100)

This commit is contained in:
Mostafa Abdelraouf
2022-07-29 13:58:25 -05:00
committed by GitHub
parent 8a06fc4047
commit 48cff1f955
2 changed files with 2 additions and 2 deletions

View File

@@ -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).

View File

@@ -328,7 +328,7 @@ impl ConnectionPool {
match tokio::time::timeout(
tokio::time::Duration::from_millis(healthcheck_timeout),
server.query("SELECT 1"),
server.query(";"),
)
.await
{