{"record":{"id":"63867ecfd7272336","repo":"OpenFeign/feign","slug":"server-throttled","errorCode":"SERVER_THROTTLED","errorMessage":"SERVER_THROTTLED","messagePattern":"SERVER_THROTTLED","errorType":"error_code","errorClass":"ClientException","httpStatus":null,"severity":"error","filePath":"ribbon/src/main/java/feign/ribbon/LBClient.java","lineNumber":94,"sourceCode":"      throws IOException, ClientException {\n    Request.Options options;\n    if (configOverride != null) {\n      options =\n          new Request.Options(\n              configOverride.get(CommonClientConfigKey.ConnectTimeout, connectTimeout),\n              TimeUnit.MILLISECONDS,\n              (configOverride.get(CommonClientConfigKey.ReadTimeout, readTimeout)),\n              TimeUnit.MILLISECONDS,\n              configOverride.get(CommonClientConfigKey.FollowRedirects, followRedirects));\n    } else {\n      options =\n          new Request.Options(\n              connectTimeout, TimeUnit.MILLISECONDS, readTimeout, TimeUnit.MILLISECONDS, true);\n    }\n    Response response = request.client().execute(request.toRequest(), options);\n    if (retryableStatusCodes.contains(response.status())) {\n      response.close();\n      throw new ClientException(ClientException.ErrorType.SERVER_THROTTLED);\n    }\n    return new RibbonResponse(request.getUri(), response);\n  }\n\n  @Override\n  public RequestSpecificRetryHandler getRequestSpecificRetryHandler(\n      RibbonRequest request, IClientConfig requestConfig) {\n    if (clientConfig.get(CommonClientConfigKey.OkToRetryOnAllOperations, false)) {\n      return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(), requestConfig);\n    }\n    if (request.toRequest().httpMethod() != HttpMethod.GET) {\n      return new RequestSpecificRetryHandler(true, false, this.getRetryHandler(), requestConfig);\n    } else {\n      return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(), requestConfig);\n    }\n  }\n\n  static class RibbonRequest extends ClientRequest implements Cloneable {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/OpenFeign/feign/blob/e2a1e27560a1e68840c34f031afca88b36096e30/ribbon/src/main/java/feign/ribbon/LBClient.java#L76-L112","documentation":"LBClient (ribbon module) executes the request through the underlying Feign client and, if the HTTP response status is one of the configured retryableStatusCodes, closes the response and throws a ribbon ClientException with ErrorType.SERVER_THROTTLED. This signals the server throttled/rejected the call so ribbon's load balancer can retry on another server.","triggerScenarios":"The remote server responds with an HTTP status contained in retryableStatusCodes (typically 503 or similar throttle statuses) during LBClient.execute().","commonSituations":"Server-side rate limiting or overload returning 503/429; an upstream behind a load balancer shedding load; misconfigured retryable status list that includes statuses the server uses for other purposes.","solutions":["Retry the call (ribbon does this automatically if the status is in the retry handler); add backoff/jitter for repeated throttle responses","Reduce request rate or add client-side rate limiting / circuit breaking","Adjust retryableStatusCodes in LBClient.Factory if the status codes your server uses for throttling differ","Scale or fix the upstream server returning the throttle status"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  return lbClient.execute(request, options);\n} catch (com.netflix.client.ClientException e) {\n  if (e.getErrorType() == ClientException.ErrorType.SERVER_THROTTLED) {\n    // backoff and retry / fail over to another server\n  }\n  throw e;\n}","preventionTips":["Add client-side rate limiting and exponential backoff with jitter","Monitor upstream 503/429 rates and configure retryableStatusCodes to match your server","Use ribbon retries and circuit breakers to survive transient throttling"],"tags":["ribbon","load-balancer","throttling","retry"],"backgroundTag":"rate-limit-exceeded","analyzedSha":"e2a1e27560a1e68840c34f031afca88b36096e30","analyzedAt":"2026-09-10T12:37:37.238Z","contentChangedAt":"2026-09-10T12:37:37.238Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}