-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix 502 connection errors in enterprise environments with keep-alive and auto-reconnection #6462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…environments - Add connection keep-alive mechanism to prevent firewall timeouts - Implement automatic reconnection with exponential backoff for 502/503/504 errors - Add enterprise network configuration options in provider settings - Enhance task state preservation for better resumption after interruptions - Add comprehensive tests for connection handling functionality Fixes #6461
- Add connectionKeepAliveEnabled, connectionKeepAliveInterval, connectionRetryEnabled, connectionMaxRetries, and connectionRetryBaseDelay to EVALS_SETTINGS - Fixes TypeScript compilation error in global-settings.ts
- Remove default values from connection properties to make them truly optional - Fixes TypeScript compilation errors in e2e tests that use partial RooCodeSettings objects - Connection properties will use fallback defaults in Task.ts implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this comprehensive implementation of enterprise connection reliability features! This addresses a real pain point for enterprise users. I have reviewed the changes and found several areas that need attention before this can be merged safely.
Critical Issues Found1. Missing default values in provider settings schema (packages/types/src/provider-settings.ts:82) connectionKeepAliveEnabled: z.boolean().default(true).optional(),
connectionKeepAliveInterval: z.number().min(5000).max(300000).default(30000).optional(),2. Incomplete keep-alive implementation (src/core/task/Task.ts:2246-2250) 3. Potential infinite recursion in retry logic (src/core/task/Task.ts:2298) 4. Missing global-settings.ts file Additional Suggestions
|
|
The issue is not properly scoped, Closing |
Summary
This PR addresses issue #6461 by implementing comprehensive connection reliability improvements for enterprise environments where firewalls disconnect long-running connections after ~2 minutes.
Changes Made
🔗 Connection Keep-Alive Mechanism
🔄 Automatic Reconnection with Exponential Backoff
🏢 Enterprise Network Configuration
connectionKeepAliveEnabled: Enable/disable keep-alive (default: true)connectionKeepAliveInterval: Keep-alive interval in ms (default: 30000)connectionRetryEnabled: Enable/disable auto-retry (default: true)connectionMaxRetries: Maximum retry attempts (default: 3)connectionRetryBaseDelay: Base delay for exponential backoff (default: 2000ms)💾 Enhanced Task State Preservation
🧪 Comprehensive Testing
Technical Implementation
Core Changes
Error Handling
Backward Compatibility
Testing
Fixes
Closes #6461
User Impact
Enterprise users will experience:
Important
Enhances connection reliability in enterprise environments with keep-alive and auto-reconnection features, including comprehensive testing and configuration options.
Task.tsto prevent idle disconnections, configurable viaconnectionKeepAliveEnabledandconnectionKeepAliveInterval.Task.ts, configurable viaconnectionRetryEnabled,connectionMaxRetries, andconnectionRetryBaseDelay.provider-settings.tsandglobal-settings.tsto include new enterprise network settings.EVALS_SETTINGSinglobal-settings.ts.Task.connection.spec.tsfor testing connection management features.provider-settings.spec.tsfor validating new configuration options.This description was created by
for ad26adc. You can customize this summary. It will automatically update as commits are pushed.