Is this error a setting in pants or the remote cac...
# general
g
Is this error a setting in pants or the remote cache (using: bazel-remote)?
Copy code
06:15:31.98 [WARN] Failed to write to remote cache (1 occurrences so far): ResourceExhausted: "grpc: received message larger than max (6201193 vs. 4194304)"
b
There’s settings like https://www.pantsbuild.org/2.19/reference/global-options#remote_store_batch_api_size_limit that presumably have to be in sync between client and server, but I don’t know the specifics
g
go's default gRPC setting is 4MB which seems to align with the default here
I don't know if the issue is that the client is sending too big of a file or what. I quickly forked bazel-remote and increased the grpc.MaxRecvMsgSize so that it's larger than the shown value. After I did that I got a new error message.
Copy code
opts = append(opts, grpc.MaxRecvMsgSize(8388608))
After making the change I got a different error (even though similar)
Copy code
20:13:34.86 [WARN] Failed to write to remote cache (1 occurrences so far): OutOfRange: "Error, message length too large: found 5790600 bytes, the limit is: 4194304 bytes"
There also isn't a single error in NGINX or bazel-remote. Unfortunately I don't know gRPC. I've never used it, until now.
f
@gentle-flower-25372 - i m not sure which tool is failing but if you can increase verbosity,
--level=DEBUG
for pants,
-vvv
for some other tools. you may get enough detail to see which side of the client/server arch is complaining of the size.
g
@fresh-continent-76371 Thanks. I set
client_max_body_size
to
0
before even running into this issue.
l
g
Thanks, @little-pilot-11155. Unfortunately the HTTP 413 is a different symptom than mine. The symptom in that thread (HTTP 413) occurs when NGINX rejects the request because the body size exceeds
client_max_body_size
. I'm getting an actual gRPC error. But that thread does mention a pants CLI flag to increase logging for the rust code which I wasn’t aware of. I’m going to try that out and see if it reveals anything new.
l
What that thread shows is that Pants supports sending big files to the remote cache 🙂 Also, there is an issue similar to yours, open in bazel remote -> https://github.com/buchgr/bazel-remote/issues/658 Generally, remote cache systems will send errors back to the client, so it looks like it came from Pants.
g
I’ve sent big files as well. I have a lot of evidence of that. So this is baffling me.