Hello guys, how's it going?
# spicedb
t
Hello guys, how's it going? I'm having an issue with the read relationships api. I've been getting some 504 Gateway Timeout every now and then. Is there a case in which spicedb would throw a 504? I'm using the http api by the way. Can't find any logs on spicedb either
a
Are you running NGINX or Envoy as a reverse proxy in front of SpiceDB?
t
I believe so. That's probably it, isn't it?
j
either that or you're not using pagination
and the number of rels to be returned is super large
t
Hm, that could be it too. I'm not paginating
Actually not, cause I tried the same request from my machine, and I got a 200
j
I'd recommend using pagination anyway
but yeah
it could just be the proxy
t
Is there pagination on the read relationships api? Can't find an example
There is a cursor on the rpc api, but I can't find it on the http one
j
the http one mirrors the rpc
its the same API
t
@Joey , if the number of relations is super large, would I also get a 504 gateway timeout? Since it's a stream, wouldn't it be another error?
j
not if called via the rest gateway
REST doesn't stream
well, it sort of does
but if it works from your local machine
its unlikely to be that
t
I'm wondering, could these errors be from the grpc gateway? If so, how could I debug it?
j
its unlikely unless the request is timing out
you should use pagination regardless
t
I understand. But I still don't think that's what's causing this issue because some of these timed out requests work fine when calling from my machine, and they often don't even return any relationship. Spicedb metrics such as response time are also fine. We couldn't find error logs on spicedb or on our istio side cars either. I'll keep digging. Is the grpc gateway another application or does it run inside spicedb?
j
is this against Authzed serverless or your own install or...?
t
We are running it on our kubernetes cluster
j
the REST gateway in that case is run in the same process, but its "fronts" the GRPC API
t
So it's unlikely the problem indeed
I'll keep looking. Thank you for the timely answers by the way!
2 Views