mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-27 10:46:30 +00:00
Slightly more light weight health check (#100)
This commit is contained in:
committed by
GitHub
parent
8a06fc4047
commit
48cff1f955
@@ -14,7 +14,7 @@ port = 6432
|
|||||||
# How long to wait before aborting a server connection (ms).
|
# How long to wait before aborting a server connection (ms).
|
||||||
connect_timeout = 100
|
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
|
healthcheck_timeout = 100
|
||||||
|
|
||||||
# For how long to ban a server if it fails a health check (seconds).
|
# For how long to ban a server if it fails a health check (seconds).
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ impl ConnectionPool {
|
|||||||
|
|
||||||
match tokio::time::timeout(
|
match tokio::time::timeout(
|
||||||
tokio::time::Duration::from_millis(healthcheck_timeout),
|
tokio::time::Duration::from_millis(healthcheck_timeout),
|
||||||
server.query("SELECT 1"),
|
server.query(";"),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user