{"record":{"id":"262248e9366ea6b0","repo":"risingwavelabs/risingwave","slug":"rpcerror","errorCode":null,"errorMessage":"RpcError","messagePattern":"RpcError","errorType":"exception","errorClass":"SchedulerError","httpStatus":null,"severity":"error","filePath":"src/frontend/src/scheduler/error.rs","lineNumber":29,"sourceCode":"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse risingwave_batch::error::BatchError;\nuse risingwave_common::session_config::QueryMode;\nuse risingwave_connector::error::ConnectorError;\nuse risingwave_rpc_client::error::RpcError;\nuse thiserror::Error;\n\nuse crate::error::{ErrorCode, RwError};\nuse crate::scheduler::plan_fragmenter::QueryId;\n\n#[derive(Error, Debug)]\npub enum SchedulerError {\n    #[error(\"Pin snapshot error: {0} fails to get epoch {1}\")]\n    PinSnapshot(QueryId, u64),\n\n    #[error(transparent)]\n    RpcError(\n        #[from]\n        #[backtrace]\n        RpcError,\n    ),\n\n    #[error(\"{0}\")]\n    TaskExecutionError(String),\n\n    #[error(\"Task got killed because compute node running out of memory\")]\n    TaskRunningOutOfMemory,\n\n    /// Used when receive cancel request for some reason, such as user cancel or timeout.\n    #[error(\"Query cancelled: {0}\")]\n    QueryCancelled(String),\n\n    #[error(\n        \"Reject query: the {0} query number reaches the limit: {1}. Use `SHOW PROCESSLIST` to check for hanging queries and cancel them if needed.\"","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/scheduler/error.rs#L11-L47","documentation":"SchedulerError::RpcError is a transparent wrapper (via #[from]) over risingwave_rpc_client::RpcError, so the displayed message is just the underlying RPC error. It surfaces when the frontend scheduler's gRPC calls to compute nodes or the meta node fail during query execution — connection failures, deadline exceeded, or transport errors.","triggerScenarios":"Any gRPC exchange during batch scheduling fails: `SwapOrder`, executing stage requests to compute nodes, or `pin_snapshot` RPCs, when the target node is down, the network partitions, or the request deadline expires.","commonSituations":"A compute node crashed or was restarted mid-query; misconfigured service ports; network isolation between frontend and compute nodes; timeouts under heavy load.","solutions":["Check that all compute nodes are healthy (`SHOW LIVE NODES` / cluster logs) and restart crashed nodes.","Retry the query; transient gRPC failures often resolve after the cluster reconverges.","Verify network connectivity and configured host/port settings between frontend, meta, and compute nodes.","If timeouts recur under load, increase RPC timeout settings or scale out compute resources."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// probe connectivity first\npsql -h <frontend> -p 4566 -c 'SHOW LIVE NODES';","typeGuard":null,"tryCatchPattern":"// retry on RpcError, surface others\nmatch res { Err(e) if is_rpc_error(&e) => retry(3, backoff), other => other }","preventionTips":["Keep compute nodes running; avoid restarts during queries","Validate network/ports between frontend, meta, and compute nodes","Set generous RPC timeouts for large queries"],"tags":["frontend","scheduler","rpc","grpc","network"],"backgroundTag":"network-request-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}