GrpcStatus(Status { code: Internal, message: "protocol error: received message with invalid compression flag: 60 (valid flags are 0 and 1) while receiving response with status: 503 Service Unavailable", metadata: MetadataMap { headers: {"content-length": "107", "cache-control": "no-cache", "content-type": "text/html"} }, source: None })
In most cases, backing off and retrying after a short delay of 1-2 seconds results in a successful request.
Some, but not all, could potentially be mitigated or avoided by adjustments to timeouts and keep alives, or in the alternative, adjustments to those attributes may empirically show they do not resolve the issue and stability efforts should be put elsewhere.
Solution
In the NodeConnection channel setup, several values are hard coded:
Problem
We are seeing a significant number of TCP and HTTP connection related errors with the gRPC endpoints, such as:
In most cases, backing off and retrying after a short delay of 1-2 seconds results in a successful request.
Some, but not all, could potentially be mitigated or avoided by adjustments to timeouts and keep alives, or in the alternative, adjustments to those attributes may empirically show they do not resolve the issue and stability efforts should be put elsewhere.
Solution
In the
NodeConnection
channel setup, several values are hard coded:https://github.com/hashgraph/hedera-sdk-rust/blob/40cc835628347772ca1cc71b9d860e2a4c3b1214/src/client/network/mod.rs#L594-L597
We would like to make them configurable at the time a new
Client
is created.Alternatives