{"record":{"id":"10da425f3ce3dd7c","repo":"risingwavelabs/risingwave","slug":"server-throttled-0","errorCode":null,"errorMessage":"Server throttled: {0}","messagePattern":"Server throttled: (.+?)","errorType":"error_code","errorClass":"PsqlError","httpStatus":null,"severity":"warning","filePath":"src/utils/pgwire/src/error.rs","lineNumber":87,"sourceCode":"    #[error(transparent)]\n    Uncategorized(\n        #[from]\n        #[backtrace]\n        BoxedError,\n    ),\n\n    #[error(\"Panicked when handling the request: {0}\nThis is a bug. We would appreciate a bug report at:\n  https://github.com/risingwavelabs/risingwave/issues/new?labels=type%2Fbug&template=bug_report.yml\")]\n    Panic(String),\n\n    #[error(\"Unable to setup an SSL connection\")]\n    SslError(#[from] openssl::ssl::Error),\n\n    #[error(\"terminating connection due to idle-in-transaction timeout\")]\n    IdleInTxnTimeout,\n\n    #[error(\"Server throttled: {0}\")]\n    ServerThrottle(String),\n}\n\n#[derive(Debug)]\npub struct ProtocolViolationError(String);\n\nimpl fmt::Display for ProtocolViolationError {\n    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n        self.0.fmt(f)\n    }\n}\n\nimpl std::error::Error for ProtocolViolationError {\n    fn provide<'a>(&'a self, request: &mut std::error::Request<'a>) {\n        request.provide_value(PostgresErrorCode::ProtocolViolation);\n    }\n}\n","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/utils/pgwire/src/error.rs#L69-L105","documentation":"PgwireError::ServerThrottle: the pgwire server is rate-limiting or rejecting incoming work (e.g. connection or query throttling limits reached) and reports the reason in the message. The client request was refused due to server-side load protection, not a SQL error.","triggerScenarios":"Connecting or issuing requests while the server is under a throttle policy (e.g. frontend connection or query admission throttling) — the string payload explains which throttle triggered.","commonSituations":"Too many concurrent connections from one deployment; bursty client traffic overwhelming the frontend; rate limiting during cluster overload or leader transitions.","solutions":["Read the payload string to identify which throttle was hit.","Reduce client concurrency/connection rate or add client-side backoff and retry with jitter.","Scale out frontend nodes or raise the throttle configuration if limits are too strict.","Investigate underlying overload (slow queries, resource pressure) that is triggering throttling."],"exampleFix":"// before: fixed-size pool hammering the server\nlet pool = Pool::builder().max_size(500).build(manager);\n// after: bounded pool with backoff retry\nlet pool = Pool::builder().max_size(50).build(manager);\n// + exponential backoff on 'Server throttled'","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match err {\n    PsqlError::ServerThrottle(reason) => {\n        warn!(\"throttled: {}\", reason);\n        backoff_and_retry();\n    }\n    other => return Err(other),\n}","preventionTips":["Cap connection pool size below server limits.","Add exponential backoff with jitter on all client retry loops.","Monitor frontend load and scale before hitting throttles."],"tags":["throttling","rate-limit","overload"],"backgroundTag":"rate-limit-exceeded","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}