qishibo/AnotherRedisDesktopManager · error
Delete Batch Stream On Error: ${e.message}
Error message
Delete Batch Stream On Error: ${e.message} What it means
The SCAN-based readable stream used by the batch-delete dialog emitted its 'error' event. Mid-scan failures come from the underlying connection or cluster: ECONNRESET, READONLY during failover, MOVED/IO errors when slots move in cluster mode, or the server closing the stream. The handler stops loadingScan and shows a 1.5s toast, but the already-scanned keys remain in the list.
Source
Thrown at src/components/DeleteBatch.vue:95
count: 20000,
};
const stream = node.scanBufferStream(scanOption);
this.scanStreams.push(stream);
stream.on('data', (keys) => {
this.addToList(keys.sort());
// pause for dom rendering
stream.pause();
setTimeout(() => {
this.loadingScan && stream.resume();
}, 100);
});
stream.on('error', (e) => {
this.loadingScan = false;
this.$message.error({
message: `Delete Batch Stream On Error: ${e.message}`,
duration: 1500,
});
});
stream.on('end', () => {
// all nodes scan finished(cusor back to 0)
if (--this.scanningCount <= 0) {
this.loadingScan = false;
this.scanningEnd = true;
}
});
});
},
addToList(keys) {
const list = [];
for (const key of keys) {
list.push({ key, str: this.$util.bufToString(key) });View on GitHub (pinned to c149855106)
Solutions
- Reconnect and restart the batch delete; already-found keys remain listed so the retry is cheaper
- Run long scans against a stable topology (no concurrent resharding/failover)
- Tune SCAN COUNT and the pause interval so iterations finish before idle timeouts
- Persist the cursor and resume from it instead of restarting from 0
Example fix
// before
stream.on('error', (e) => {
this.loadingScan = false;
this.$message.error({ message: `Delete Batch Stream On Error: ${e.message}`, duration: 1500 });
});
// after
stream.on('error', (e) => {
this.loadingScan = false;
stream.destroy();
this.$message.error({
message: `Delete Batch Stream On Error: ${e.message} (scanned ${this.allKeysList.length} keys, retry to continue)`,
duration: 3000,
});
}); Defensive patterns
Strategy: try-catch
Try / catch
stream.on('error', (e) => {
this.loadingScan = false;
stream.destroy(); // release cursor and socket bookkeeping
// keep already-collected keys so a retry can continue
this.$message.error(`Delete Batch Stream On Error: ${e.message}`);
}); Prevention
- Always listen for 'error' on readable streams or the process throws
- Destroy the stream in the error handler
- Track scanned keys/cursor so retries resume instead of restarting
- Avoid long scans during cluster maintenance windows
When it happens
Trigger: Scanning a huge keyspace when the connection drops; cluster resharding or master failover mid-scan; server/client idle timeout killing long SCAN iterations; LB cutting long-lived connections.
Common situations: Deleting millions of keys over VPN, cleanup jobs running during maintenance windows, scans outliving load-balancer idle timeouts.
Related errors
- Stream On Error: ${e.message}
- this.$t('message.delete_failed')
- e.message
- msg
- You are in readonly mode! Unable to execute write command!
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/a5eb883193955676.
Report an issue: GitHub.