-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Improve Error Handling in Connection Management - Timeout Configuration Missing
Description
The current implementation of the Akave SDK for Python lacks proper timeout configuration for gRPC connections. The ConnectionPool class in sdk/connection.py creates insecure gRPC channels without specifying any timeout parameters, which could lead to hung connections during network issues or service unavailability. This can cause the client application to freeze indefinitely when network errors occur.
Current Behavior
- gRPC connections are created using
grpc.insecure_channel(addr)without timeout configuration - In the
_new_connectionmethod, if an exception occurs, it returnsNonewithout logging the specific error - Users have no way to configure timeout parameters for API calls
- In the
SPClientclass, HTTP requests have explicit timeout parameters (10 seconds), but gRPC connections do not - When network issues occur, operations may hang indefinitely waiting for a response
Expected Behavior
- gRPC connections should be created with appropriate timeout configurations
- Connection failures should provide detailed error information for debugging
- Users should be able to configure connection timeouts via SDK parameters
- All network operations should have consistent timeout handling
Metadata
Metadata
Assignees
Labels
No labels