mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-23 01:16: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).
|
||||
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).
|
||||
|
||||
@@ -328,7 +328,7 @@ impl ConnectionPool {
|
||||
|
||||
match tokio::time::timeout(
|
||||
tokio::time::Duration::from_millis(healthcheck_timeout),
|
||||
server.query("SELECT 1"),
|
||||
server.query(";"),
|
||||
)
|
||||
.await
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user