Redis version: 3.0.6
Redisson version: 2.2.4
The master slave, sentinse, single tried all have a problem, the connection timeout is set to 5000 do you have any questions,
Public Redisson getMasterSlaveClient (String add, String hosts) {
The Config Config=new Config ();
String [] hostarr=hosts. The split (", ");
The config. UseMasterSlaveServers (.) setMasterAddress (add). SetLoadBalancer (
New RandomLoadBalancer ())//RoundRobinLoadBalancer 2 by default
AddSlaveAddress (hostarr). SetMasterConnectionPoolSize (10000). SetSlaveConnectionPoolSize (
10000). SetConnectTimeout (5000);
Redisson Redisson=(Redisson) Redisson. Create (config);
Return redisson;
}
Under Caused by: org. Redisson. Client. RedisConnectionException: Can 't init enough connections amount! The from/192.168.1.8:6379
The at org. Redisson. Misc. ConnectionPool $2. OperationComplete (ConnectionPool. Java: 95)
At io.net, ty. Util. Concurrent. DefaultPromise. NotifyListener0 (DefaultPromise. Java: 680)
At io.net ty. Util. Concurrent. DefaultPromise $2. The run (592) DefaultPromise. Java:
At io.net, ty. Util. Concurrent. SingleThreadEventExecutor. RunAllTasks (SingleThreadEventExecutor. Java: 358)
At io.net, ty. Channel. Nio. NioEventLoop. Run (NioEventLoop. Java: 357)
At io.net ty. Util. Concurrent. SingleThreadEventExecutor $2. The run (112) SingleThreadEventExecutor. Java:
At io.net, ty. Util. Concurrent. DefaultThreadFactory $DefaultRunnableDecorator. Run (DefaultThreadFactory. Java: 137)
CodePudding user response:
How do you solve, I also metCodePudding user response:
Redis. Conf in protected mode - yes to protected mode - noIs this wrong, I find the reason for a long time,
CodePudding user response:
You go and see yourself inside the redis configuration file is configured with most what is the number of connections.CodePudding user response:
There are big solved