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
Describe the bug
We have a server that processes background jobs. Redis is uses as cache manager to overcome the load from SQL database. The object for IRedisCacheClient is singleton but I observed too many active connections. I had to reboot the server because too much ports were in use and user crashed. Connections are from known clients, but too many ports were exposed due to that the server gets down and had to reboot.
Code for registering the dependencies
builder.RegisterType<RedisCacheConnectionPoolManager>().As<IRedisCacheConnectionPoolManager>().SingleInstance();
builder.RegisterType<RedisCacheClient>().As<IRedisCacheClient>().SingleInstance();
builder.RegisterType<NewtonsoftSerializer>().As<ISerializer>();
builder.Register((context) =>
{
var redisCacheClient = EngineContext.Current.Resolve<IRedisCacheClient>();
return redisCacheClient.GetDbFromConfiguration();
}).SingleInstance();
builder.Register((context) =>
{
return new RedisConfiguration()
{
Hosts = new RedisHost[] { new RedisHost() { Host = _config.CoreSecrets.RedisHost, Port = port } },
Ssl = false,
ConnectTimeout = 15 * 1000,
SyncTimeout = 5000,
AbortOnConnectFail = false,
PoolSize = 10
};
}).SingleInstance();
OS: Windows
Runtime version .NET Framework 4.6.2
Library Version 6.4.5
The text was updated successfully, but these errors were encountered:
Describe the bug
We have a server that processes background jobs. Redis is uses as cache manager to overcome the load from SQL database. The object for IRedisCacheClient is singleton but I observed too many active connections. I had to reboot the server because too much ports were in use and user crashed. Connections are from known clients, but too many ports were exposed due to that the server gets down and had to reboot.
Code for registering the dependencies
The text was updated successfully, but these errors were encountered: