c++ server memory leak in a broadcasting model.

44 views
Skip to first unread message

Arthur Wang

unread,
Oct 20, 2019, 2:56:13 PM10/20/19
to grpc.io
hi all:

    I have 3 grpc c++ servers(A/B/C) and they work as in broadcast model: the client sent every request to serverA, and serverA then broadcast the request the serverB & serverC in an asynchronous way.

                   Client
                      |
                     A
                   /    \
                 /       \
                B        C

but ServerA seems get a memory leak problem:   every 40k requests from client will make its memory gain about 5m~8m.   I examined a lot on serverA 's code, but cannot find anything wrong.

Can anyone help take a look at my code(attchmented)?

Env:

os: win10 
grpc:1.21.x
lang: c++

proxy_adventurer.cc

Arthur Wang

unread,
Oct 20, 2019, 2:56:49 PM10/20/19
to grpc.io
ServerB & ServerC is a ping-pong server. 

Arthur Wang

unread,
Oct 20, 2019, 2:58:24 PM10/20/19
to grpc.io
Also, if I don't trigger the broadcasting procedure, the memory usage seems good.  The AsyncUnaryGreeterClient must got something wrong, but I can't figure it out.
Reply all
Reply to author
Forward
0 new messages