limited”,该错误是因为服务进行了并发控制。" />
org.apache.dubbo.rpc.RpcException: Failed to invoke method sayHello in provider dubbo://192.168.238.1:20880/com.huangx.dubbo.service.HelloService?anyhost=true...register=true&release=2.7.1&side=provider×tamp=1559453723026, cause: The service using threads greater than <dubbo:service executes="2" /> limited.
at org.apache.dubbo.rpc.filter.ExecuteLimitFilter.invoke(ExecuteLimitFilter.java:44)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:79)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:137)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:39)...
上面这个错误已经给出了明确的错误原因在Dubbo服务端配置了并发控制,最大允许两个客户端连接。配置如下:
<dubbo:service interface="com.***.Service" executes="2" />
解决办法:
1、调整服务允许的最大并发连接数;
2、控制客户端连接,客户端建立的连接数小于服务端 executes 指定的大小;