mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-23 01:16:30 +00:00
feat: set keepalive for pgcat server itself (#402)
* feat: set keepalive for pgcat server self * docs: note also set for client
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# PgCat Configurations
|
||||
# PgCat Configurations
|
||||
## `general` Section
|
||||
|
||||
### host
|
||||
@@ -127,7 +127,7 @@ path: general.tcp_keepalives_idle
|
||||
default: 5
|
||||
```
|
||||
|
||||
Number of seconds of connection idleness to wait before sending a keepalive packet to the server.
|
||||
Number of seconds of connection idleness to wait before sending a keepalive packet to the server and client.
|
||||
|
||||
### tcp_keepalives_count
|
||||
```
|
||||
|
||||
@@ -79,6 +79,7 @@ mod stats;
|
||||
mod tls;
|
||||
|
||||
use crate::config::{get_config, reload_config, VERSION};
|
||||
use crate::messages::configure_socket;
|
||||
use crate::pool::{ClientServerMap, ConnectionPool};
|
||||
use crate::prometheus::start_metric_server;
|
||||
use crate::stats::{Collector, Reporter, REPORTER};
|
||||
@@ -289,6 +290,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
let tls_certificate = get_config().general.tls_certificate.clone();
|
||||
|
||||
configure_socket(&socket);
|
||||
|
||||
tokio::task::spawn(async move {
|
||||
let start = chrono::offset::Utc::now().naive_utc();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user