0

I have a gRPC client integration which recieves messages which are about 65MB in size (date x time tuple arrays mainly). Deserializing the received message seems to allocate about 700MB of extra unmanaged memory on the initial request. Subsequent identical requests do not increase the total process memory consumption anymore.

Is that normal? Any ideas how to figure out what is going on, or even better, to control this?

Efrain
  • 3,248
  • 4
  • 34
  • 61

1 Answers1

0

It seems this had to do with receiving the data in async contexts. Somehow the task scheduler held on to the Task which was the converted message payload. Adding a Task.Yield() at the end of the async method calling the gRPC client seems to solve it.

Check this discussion: https://github.com/grpc/grpc-dotnet/issues/1267

Efrain
  • 3,248
  • 4
  • 34
  • 61