You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose there is some (any) kind of issue affecting the server, or the connection to it. In a recent incident we had a TypeDB Cloud cluster node that was not responding to the user_token GRPC request. This meant that TypeDB.cloudDriver (using, in our case, either the Java driver or Rust driver) would hang indefinitely, rather than throwing an error.
Proposed Solution
The most obvious solution would be to add a timeout to GRPC calls in the Rust driver. This would need to be done with care, as long-running queries are legitimate.
Additional Information
We ran the following test...
let connection = Connection::new_cloud_with_translation([("address1","localhost:1729"),("address2","localhost:1730"),("address3","localhost:1731"),].into(),Credential::without_tls("username","password")).unwrap();
... with the following modifications to our source code (println statements)
running 1 test
localhost:1730
a
b
d
e
g
h
test integration::network::address_translation has been running for over 60 seconds
This indicates that it hung at self.grpc.user_token(req).await in renew_token.
Naturally, you'd need a broken server to actually reproduce the issue; we hypothesise that it stops responding when there are too many concurrent connections to it.
Putting the server on a breakpoint might also work.
The text was updated successfully, but these errors were encountered:
alexjpwalker
changed the title
GRPC calls may hang indefinitely
GRPC calls may hang indefinitely in the event of a server fault
Jul 19, 2024
Problem to Solve
Suppose there is some (any) kind of issue affecting the server, or the connection to it. In a recent incident we had a TypeDB Cloud cluster node that was not responding to the
user_token
GRPC request. This meant thatTypeDB.cloudDriver
(using, in our case, either the Java driver or Rust driver) would hang indefinitely, rather than throwing an error.Proposed Solution
The most obvious solution would be to add a timeout to GRPC calls in the Rust driver. This would need to be done with care, as long-running queries are legitimate.
Additional Information
We ran the following test...
... with the following modifications to our source code (
println
statements)This produced the following output ...
This indicates that it hung at
self.grpc.user_token(req).await
inrenew_token
.Naturally, you'd need a broken server to actually reproduce the issue; we hypothesise that it stops responding when there are too many concurrent connections to it.
Putting the server on a breakpoint might also work.
The text was updated successfully, but these errors were encountered: