0-1 - thread pool resource exhausted

The server’s thread resources are exhausted. By default, the number of business threads on the Dubbo server is 200. If the number of concurrent requests exceeds 200, new requests will be rejected and this error will be thrown.

Possible Reason

  1. The amount of concurrent requests from the Consumer is too large, causing the number of threads created on the Provider to exceed the limit.
  2. It is possible that when the Provider side executes the business, the thread is blocked because the business calls the external application interface, which makes the thread pool unable to recycle the thread.

Troubleshooting and resolution steps

  • Enable Dubbo’s access log function to check whether there are a large number of calls to RPC services in a short period of time.
  • Check the status of each thread in the thread pool through the jps and jstack instructions to see if there is any business calling the external application interface to cause blocking.
  • If the amount of concurrent requests from the Consumer is too large, then adjust the dubbo.provider.threads parameter on the Provider side to increase the number of Dubbo thread pools.
  • If the QPS of the Provider business is too large to be handled by the current number of servers, then increase the number of Provider-side servers so that more servers can share the pressure.

The FAQ page of this error code refers to “Dubbo Common Errors and Solutions”. Articles cited are compiled under license CC-BY-4.0. Thanks to the original author here.