mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-18 18:56:24 +00:00
redis connection pool tuning
This commit is contained in:
parent
8fe858c5c6
commit
6fdc7be502
@ -217,10 +217,11 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
|
||||
opts.password = _rc->password;
|
||||
opts.db = 0;
|
||||
opts.keep_alive = true;
|
||||
opts.connect_timeout = std::chrono::seconds(5);
|
||||
opts.connect_timeout = std::chrono::seconds(3);
|
||||
poolOpts.size = 25;
|
||||
poolOpts.wait_timeout = std::chrono::milliseconds(1000);
|
||||
poolOpts.connection_lifetime = std::chrono::minutes(5);
|
||||
poolOpts.wait_timeout = std::chrono::seconds(5);
|
||||
poolOpts.connection_lifetime = std::chrono::minutes(3);
|
||||
poolOpts.connection_idle_time = std::chrono::minutes(1);
|
||||
if (_rc->clusterMode) {
|
||||
fprintf(stderr, "Using Redis in Cluster Mode\n");
|
||||
_cluster = std::make_shared<sw::redis::RedisCluster>(opts, poolOpts);
|
||||
|
Loading…
Reference in New Issue
Block a user