client icon indicating copy to clipboard operation
client copied to clipboard

Memory leak from grpcio

Open AlexanderKomarov opened this issue 7 months ago • 1 comments

I tested tritonclient:2.43.0 on Ubuntu:22.04 with grpcio:1.62.1 and was confronted with a memory leak. Example for reproduction:

import asyncio
from tritonclient.grpc.aio import InferenceServerClient

async def get_triton_client():
    return InferenceServerClient(url='127.0.0.1:8002', verbose=True)

if __name__ == "__main__":
    while(True):
        print(asyncio.run(get_triton_client()))

The problem is reproduced on the latest versions tritonclient:2.47.0 and grpcio:1.64.1. I have found a solution to avoid it by using this version grpcio:1.58.0.

As I understand it, tritonclient has a warning to avoid using some versions of grpcio: https://github.com/triton-inference-server/client/blob/76892ce29562e8a8e3b3a613654ef40908636466/src/python/library/tritonclient/grpc/init.py#L52

Could you confirm it?

AlexanderKomarov avatar Jul 02 '24 10:07 AlexanderKomarov