我的ubuntu 16服务器上的这个错误已经用完了。我想我已经配置了一切。一切都是手动安装和配置的。
我已将redis max-clients配置设置为100000,文件描述符设置为100000,将所有sysctl设置为允许多个tcp连接,但我仍然遇到相同的错误。
Redis信息:
Redis服务器v = 3.0.6 sha = 00000000:0 malloc = jemalloc-3.6.0 bits = 64 build = 687a2a319020fa42
tcp-keepalive 60 timeout 300 max-clients 100000
无论我如何尝试更改配置,如果达到4000 ++连接,都会出现相同的结果。
你们有这样的经历吗?我希望我能从这里的任何REDIS专家那里得到一些好的建议。谢谢。
以下是连接到redis的代码
公共类RedisConnectionPool Private Shared redisMaster As ConnectionMultiplexer = Nothing Private Shared serializer As NewtonsoftSerializer = Nothing
Private Shared _lazyConnectionExt As Lazy(Of StackExchangeRedisCacheClient)
Public Shared CacheClient As StackExchangeRedisCacheClient
Shared Sub New()
serializer = New NewtonsoftSerializer()
Dim configs As New ConfigurationOptions
With configs
.EndPoints.Add(RedisConfig.EndPoints)
.ClientName = RedisConfig.ClientName
.KeepAlive = 120
.ConnectTimeout = RedisConfig.ConnectionTimeout
.SyncTimeout = RedisConfig.SyncTimeout
.AllowAdmin = RedisConfig.AllowAdmin
.Password = RedisConfig.Password
.AbortOnConnectFail = RedisConfig.AbortOnConnectFail
.DefaultDatabase = 0
End With
redisMaster = ConnectionMultiplexer.Connect(configs)
_lazyConnectionExt = New Lazy(Of StackExchangeRedisCacheClient)(Function()
Return New StackExchangeRedisCacheClient(redisMaster, serializer)
End Function)
CacheClient = _lazyConnectionExt.Value
End Sub
End Class