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
I use StackExchange.Redis.Extensions.Core of version 6.3.4
On each failed request RedisCacheConnectionPoolManager will create new connections. For example it happens when redis database is disabled or invoked restart
Steps to reproduce:
Run API endpoint which on every request will make any request to redis. RedisConfig.PoolSize is 2
Enable Runner in postman which will hit this endpoint 10000 times without delay
Run in redis CLI command "client list" -> there will be 2-5 connections
Invoke redis reboot without disabling Runner
When reboot will be finished run redis CLI command "client list" -> where will be ~20 connection. Which will be much more then expected when poolSize is 2
Expected: Same 2-5 connections
Reason:
In StateAwareConnection.ConnectionFailed method raised invalidateConnectionCallback which referenced to EmitConnection method of RedisCacheConnectionPoolManager. This method creates new connection on each failed request. But old connections will not be closed.
Possible workaround:
Call Invalidate() method in ConnectionFailed
Update Invalidate() method to use multiplexer?.Close() instead of multiplexer?.Dispose()
The text was updated successfully, but these errors were encountered:
I use StackExchange.Redis.Extensions.Core of version 6.3.4
On each failed request RedisCacheConnectionPoolManager will create new connections. For example it happens when redis database is disabled or invoked restart
Steps to reproduce:
Expected: Same 2-5 connections
Reason:
In StateAwareConnection.ConnectionFailed method raised invalidateConnectionCallback which referenced to EmitConnection method of RedisCacheConnectionPoolManager. This method creates new connection on each failed request. But old connections will not be closed.
Possible workaround:
The text was updated successfully, but these errors were encountered: