Has anybody encountered intermittent issues with O...
# ory-network
l
Has anybody encountered intermittent issues with Ory Keto and gRPC calls?
Copy code
Error with gRPC Keto check request: 14 Error 14 UNAVAILABLE: read ECONNRESET
p
Hi @loud-honey-70375 This seems strange, is this happening frequently? Under what conditions do you get this error? e.g. consecutive requests?
l
It seems to happen more frequently on first login, if there was an error with the previous attempt at a login
although its not consistent
When I log the user in I request the user object from the server, which does a grpc check request with the session user's id
Refreshing the page typically fixes it, and its not at all consistent so Im not sure whats going on
At the moment I'm implementing some retry handling to get around this, but theres nothing complex about the call
Copy code
private async checkGRPC(rt: PermissionRelationTuple): Promise<CheckResponse> {
  const checkClient = this.checkClient;
  // Map the callback to a promise
  return new Promise<CheckResponse>(
    (resolve, reject) => checkClient.check(rt.toCheckRequest(),
      (error: ServiceError, response: CheckResponse) => {
        if (error) {
          return reject(error);
        }
        resolve(response);
      })
  );
}
where rt is something like
Copy code
{
  namespace: 'users',
  object: 'userId',
  relation: 'read_profile'
  subject_id: 'userId'
}
It is pretty frequent though, I've had it multiple times today
Just a thought - I'm reusing the same check client/write client for all of my grpc requests, is this maybe an issue?
p
Hmm, I'm not too sure what the issue could be. We had some degraded service today which might have caused your problem. /cc @steep-lamp-91158 knows more about the grpc client and the keto check requests.
s
I also can't tell but would suspect the latency issues we had. Can you please ping us if this issue still occurs?
l
Will do, I've added retry handling for now anyway which should mitigate some of the issues
s
👍 always good, it would still help us if you could track failed attempts Can you share your project slug?
l
reverent-borg-2vcodqbbq6
s
hm I could not really find an error... but I'll keep this in my head and keep watching
l
Checking the logs, it happened 23 minutes ago
at 23443 PM GMT and at 30715 PM GMT
the retry handling seems to have caught and retried both of these requests successfully on the first retry