Would you please provide more information about how you gc the service? The response should be freed before the service get freed.
PS: For manually free arena, you could use https://cs.corp.google.com/piper///depot/google3/net/proto2/public/arena.h?q=arena.h&dr=CSs&l=351 On Wednesday, January 9, 2019 at 5:51:33 PM UTC-8, Srikanth wrote: > > Hi, > > I am using gRPC v1.17.2 for implementing CLI for my process. The gRPC > server is in C++ and the client is in Golang. > > The protobuf definition looks like this > > message GetResponseMsg { > > repeated GetResponse response = 1; // response > > } > > message GetResponse { > > Spec spec = 1; > > Status status = 2; > > Stats stats = 3; > > } > > > Each Response is probably around 500 Bytes in size all considered. The > number of responses I am trying to retrieve runs to about 200000. > > > The server implementation looks like this > > > Status > > Get(ServerContext *context, > > const GetRequestMsg *req, > > GetResponseMsg *rsp) > > { > > uint32_t i, nreqs = req->request_size(); > > > for (i = 0; i < nreqs; i++) { > > auto request = req->request(i); > > get(request, rsp->add_response()); > > } > > > return Status::OK; > > } > > > Obviously with the size of each response and the number of responses I > expect a lot of memory usage but thought the memory should be recovered > after this command is run. But this memory is never recovered and I rapidly > run out of memory and my process crashes. > > > I enabled usage of Arena in the proto file but that didn't change > anything. Is there anything I need to add to free up the memory used after > the CLI command is run? > > > I am a newbie to gRPC so am sorry if I have missed out on anything simple! > Any help is appreciated. > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/8834d187-9d0b-48f0-a007-9fa782335c3d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
