We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR error:79 - error_message: ThreadProtectedRequestRouter reject request: request_method=com.dahe.wang.remote.IMotanService.newsById request_counter=16 total_counter=16 max_thread=20, status: 503, error_code: 10002,r=1809390141866576661
电脑配置(16核 16G): maxWorkerThread="100" minWorkerThread="20" queueSize="10000" 你好,我的服务报上面那个错误,然后下面是我的配置参数,请问motan的配置参数需要优化下么?或者别的地方需要优化下?
The text was updated successfully, but these errors were encountered:
minWorkerThread、maxWorkerThread这两个参数用来配置server侧的worker线程数量,需要根据服务端可以承载的压力(比如cpu load,请求耗时、对资源的读写压力等)来决定其数值,这块建议根据压力测试来找到适合的值。
minWorkerThread
maxWorkerThread
关于这几个参数的配置建议:
server侧同步处理请求时(绝大部分业务是这种场景),需要使用worker线程完成整个server侧任务的执行,所以在server处理request期间会一直使用对应的worker线程,如果不是cpu密集型应用,这个worker数量(maxWorkerThread)可以适当加大,比如500以上(根据cpu能力和业务处理能力设置);如果是实现的react类型的异步server,比如这个样例,由于worker线程只负责io相关事件处理,可以适当调小线程池。
minWorkerThread是预期最小worker线程数,建议设置为能够满足日常平均请求压力(QPS)的数值,比如100
workerQueueSize用来设置当worker线程数量不足时的等待队列长度,一般使用RPC都是对延迟比较敏感的场景,所以一般不建议设置此参数,即使用其默认值0不做等待,容量不足时直接快速失败。
workerQueueSize
报错信息中的异常是命中了默认的线程保护策略,此策略可以避免某一个rpc方法调用突增时影响同RPC端口上的其他方法。如果业务场景比较简单,不需要进行额外的线程保护,可以在protocol中设置providerProtectedStrategy="none"
providerProtectedStrategy="none"
Sorry, something went wrong.
在protocol中没找到providerProtectedStrategy,不让设置providerProtectedStrategy="none",我先提高下maxWorkerThread,谢谢大佬指点(握手)
No branches or pull requests
ERROR error:79 - error_message: ThreadProtectedRequestRouter reject request: request_method=com.dahe.wang.remote.IMotanService.newsById request_counter=16 total_counter=16 max_thread=20, status: 503, error_code: 10002,r=1809390141866576661
电脑配置(16核 16G):
maxWorkerThread="100"
minWorkerThread="20"
queueSize="10000"
你好,我的服务报上面那个错误,然后下面是我的配置参数,请问motan的配置参数需要优化下么?或者别的地方需要优化下?
The text was updated successfully, but these errors were encountered: