gRPC python server memory consumption

28 views
Skip to first unread message

JS

unread,
Apr 20, 2020, 9:47:21 PM4/20/20
to grpc.io
Hi,

I am currently using gRPC python server and seeing an issue. 

This is with gRPC 
Server: Python
Client: go-lang 

There are Unary RPCs defined in the python gRPC server which basically execute an ansible task (ansible spawns a subprocess forking off as a child from the main top level process) and returns the result to the end user. This task can be time consuming.

I have defined a callback to handle any client side cancellations on timeout. 

Right now, I see there is a lot of memory that accumulates over time after running these RPCs which doesn't get freed once rpc is done. 

Do we need to handle any server side clean up after executing the RPC?

The leak is significant that its impacting the functionality. often see "err: rpc error: code = DeadlineExceeded desc = Deadline Exceeded" when client sends a heartbeat request to the server.

Using python 3.6 and gRPC version 1.24

The memory goes up to ~6gb over time before OOM killer kicks in.

Thanks
J/-

Lidi Zheng

unread,
Apr 21, 2020, 1:53:15 PM4/21/20
to JS, grpc.io
Can you create a reproducible example and post it to https://github.com/grpc/grpc/issues?

--
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 grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/7b3f041d-e9be-4793-a7af-8614b5431a74%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages