{"record":{"id":"ca05e9eab0f5a3ac","repo":"apache/hadoop","slug":"router-is-overloaded-not-enough-client-threads","errorCode":null,"errorMessage":"Router {} is overloaded: Not enough client threads {}/{}","messagePattern":"Router (.+?) is overloaded: Not enough client threads (.+?)/(.+?)","errorType":"exception","errorClass":"StandbyException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java","lineNumber":1692,"sourceCode":"    final Method m = method.getMethod();\n    try {\n      List<Future<Object>> futures = null;\n      if (timeOutMs > 0) {\n        futures = executorService.invokeAll(\n            callables, timeOutMs, TimeUnit.MILLISECONDS);\n      } else {\n        futures = executorService.invokeAll(callables);\n      }\n      return processFutures(method, m, orderedLocations, futures);\n    } catch (RejectedExecutionException e) {\n      if (rpcMonitor != null) {\n        rpcMonitor.proxyOpFailureClientOverloaded();\n      }\n      int active = executorService.getActiveCount();\n      int total = executorService.getMaximumPoolSize();\n      String msg = \"Not enough client threads \" + active + \"/\" + total;\n      LOG.error(msg);\n      throw new StandbyException(\n          \"Router \" + router.getRouterId() + \" is overloaded: \" + msg);\n    } catch (InterruptedException ex) {\n      LOG.error(\"Unexpected error while invoking API: {}\", ex.getMessage());\n      throw new IOException(\n          \"Unexpected error while invoking API \" + ex.getMessage(), ex);\n    } finally {\n      releasePermit(CONCURRENT_NS, ugi, method, controller);\n    }\n  }\n\n  /**\n   * Handle all futures during the invokeConcurrent call process.\n   *\n   * @param <T> The type of the remote location.\n   * @param <R> The type of the remote method return.\n   * @param method The remote method and parameters to invoke.\n   * @param m The method to invoke.\n   * @param orderedLocations List of remote locations to call concurrently.","sourceCodeStart":1674,"sourceCodeEnd":1710,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java#L1674-L1710","documentation":"Error \"Router {} is overloaded: Not enough client threads {}/{}\" thrown in apache/hadoop.","triggerScenarios":"Router fairness/overload check rejected the request because available client handler threads are below the required threshold.","commonSituations":"Traffic spike exhausting the Router's RPC handler pool, or handler count configured too low for the workload.","solutions":["Increase dfs.federation.router.handler.count (or the per-NS handler counts) to match load.","Reduce client concurrency or add more Router instances behind a load balancer.","Check fairness settings (dfs.federation.router.fairness.*) that may be rejecting requests."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}