{"record":{"id":"5bc44465c89d5f2c","repo":"risingwavelabs/risingwave","slug":"failed-to-send-records-sent-out-of","errorCode":null,"errorMessage":"failed to send records. sent {} out of {}","messagePattern":"failed to send records\\. sent (.+?) out of (.+?)","errorType":"exception","errorClass":"SinkError::Kinesis","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/kinesis.rs","lineNumber":362,"sourceCode":"                                            total_count,\n                                            \"failed to send records. code: [{}], message: [{}]\",\n                                            result_entry.error_code.unwrap_or_default(),\n                                            result_entry.error_message.unwrap_or_default()\n                                        )\n                                    }\n                                }\n                            } else {\n                                start_idx += record_count;\n                                // reset retry count when having progress\n                                remaining_no_progress_retry_count = MAX_NO_PROGRESS_RETRY_COUNT;\n                                // reset throttle delay when records can be fully sent.\n                                throttle_delay = None;\n                            }\n                        }\n                        Err(e) => {\n                            remaining_no_progress_retry_count -= 1;\n                            if remaining_no_progress_retry_count == 0 {\n                                return Err(SinkError::Kinesis(anyhow!(e).context(format!(\n                                    \"failed to send records. sent {} out of {}\",\n                                    start_idx, total_count,\n                                ))));\n                            } else {\n                                warn!(\n                                    remaining_no_progress_retry_count,\n                                    sent = start_idx,\n                                    total_count,\n                                    \"failed to send records. err: [{:?}]\",\n                                    e.as_report(),\n                                )\n                            }\n                        }\n                    }\n                }\n                Ok(())\n            }\n            .boxed()","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/kinesis.rs#L344-L380","documentation":"The PutRecords API call itself returned Err (not per-record entry failures). After decrementing and exhausting the no-progress retry counter, the sink returns the SDK error wrapped with a context showing how many records had been sent so far.","triggerScenarios":"`put_records(...).send().await` returning Err during `finish` — network failures, timeouts, auth errors, or throttling of the API call itself — repeatedly until retries run out.","commonSituations":"Network partitions between RisingWave and AWS; oversized PutRecords batches exceeding 500 records/5MB limits returning validation errors; expired credentials; VPC endpoint issues.","solutions":["Reduce batch size / check batch limits (max 500 records, 5MB per PutRecords call)","Check network connectivity and AWS endpoint reachability from the compute node","Refresh/fix AWS credentials and region configuration","Retry; the sink resumes from the checkpoint (records already sent are counted in the message)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-flight: verify endpoint reachability and creds\nnc -zv <kinesis-endpoint-host> 443\naws kinesis list-streams --region <region>","typeGuard":null,"tryCatchPattern":"match sink.finish().await {\n  Err(e) if e.to_string().contains(\"failed to send records\") => {\n    // transient SDK/transport error: rely on checkpoint replay\n    retry_with_backoff(|| sink.write_all(), 5).await\n  }\n  r => r,\n}","preventionTips":["Keep PutRecords batches under 500 records / 5MB","Ensure stable network path to AWS (VPC endpoints if private)","Rotate credentials before expiry; monitor CloudWatch throttling"],"tags":["kinesis","network","retry-exhausted","send-failure"],"backgroundTag":"http-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"}