parca-agent
parca-agent copied to clipboard
client: RPC message too big
Just so I don't forget to look into this. I've occasionally stumbled upon this error
level=debug ts=2022-05-25T09:42:00.90387003Z caller=write_client.go:92 msg="batch write client failed to send profiles" retry=2.604991381s count=1 err="rpc error: code = Internal desc = failed to normalize pprof: Key with size 96032 exceeded 65000 limit. Key:\n00000000[...]"
Possible duplicate https://github.com/parca-dev/parca-agent/issues/203
This seems different to me from #203, the error we see here is actually happening on the server-side. During normalization on the server-side, a unique key is built to identify/deduplicate a stack trace and used within a map[string], and it appears that we are exceeding the size of string that a map allows. I think this should be an issue on the Parca server.
I did some troubleshooting on this issue and I think the error message is come from the badger. This line of code(https://github.com/dgraph-io/badger/blob/master/txn.go#L357) match the error message above. Let me study how to fix this.
I think this issue is fixed by https://github.com/parca-dev/parca/pull/1178. Since this PR introduce some hashing to reduce the length of key.
We haven't seen this has actually surfaced for a while now. I'm happy to close it. @javierhonduco WDYT?
@kakkoyun sounds good to me! Closing it, let's keep an eye just in case it happens again