Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve Error Handling in Connection Management - Timeout Configuration Missing #31

@pranavkonde

Description

@pranavkonde

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_connection method, if an exception occurs, it returns None without logging the specific error
  • Users have no way to configure timeout parameters for API calls
  • In the SPClient class, 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions