You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Minimum number of idle connections which is useful when establishing
// new connection is slow.
MinIdleConns int
Say set MinIdleConns something bigger like 4 * NumCPU, go redis will instant connect redis server 4xCPU connections and mark them all idle. code here
When in common use, (start one web server) all things goes right.
But when using for tests(or other parallel binary tasks) which default behavior is run each package in parallel, redis server will recive many many (4xCPUxpackage test file number) new connections.
One possible solution is set low idle connections in test files, but still wonder in real case we also no not need such new connections at first start. If we have slow redis connections this works worse.
Expected Behavior
Just connect small piece of new connections or provide another options to set such as StartConns int.
Current Behavior
Connect server as mush as idle connections options set..
Possible Solution
New 0 conn (or StartConns option) when new conn called, and inscrease double conns len when needed, and at end reach MinIdleConns or PoolSize
As document said:
Say set
MinIdleConns
something bigger like 4 * NumCPU, go redis will instant connect redis server 4xCPU connections and mark them all idle. code hereWhen in common use, (start one web server) all things goes right.
But when using for tests(or other parallel binary tasks) which default behavior is run each package in parallel, redis server will recive many many (4xCPUx
package test file number
) new connections.One possible solution is set low idle connections in test files, but still wonder in real case we also no not need such new connections at first start. If we have slow redis connections this works worse.
Expected Behavior
Just connect small piece of new connections or provide another options to set such as
StartConns int
.Current Behavior
Connect server as mush as idle connections options set..
Possible Solution
New 0 conn (or
StartConns
option) when new conn called, and inscrease double conns len when needed, and at end reachMinIdleConns
orPoolSize
Possible Implementation
The text was updated successfully, but these errors were encountered: