# Possible memory leak in the sample apps

**URL:** <https://forums.developer.nvidia.com/t/possible-memory-leak-in-the-sample-apps/217985>\
**Category:** DeepStream SDK\
**Tags:** gstreamer, python\
**Created:** [June 17, 2022, 7:14am UTC](https://forums.developer.nvidia.com/t/possible-memory-leak-in-the-sample-apps/217985 "2022-06-17T07:14:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![user18243](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@user18243](https://forums.developer.nvidia.com/u/user18243)\
**Post date:** [June 17, 2022, 7:14am UTC](https://forums.developer.nvidia.com/t/possible-memory-leak-in-the-sample-apps/217985/1 "2022-06-17T07:14:03Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)**  
**• DeepStream Version 6.0**  
**• JetPack Version (valid for Jetson only)**

I made an app with yolov5 in deepstream on a jetson agx. We put the agx in the production site and ideally want to run it indefinitely. However the app stops after a few hours.

My question is if it is even possible to expect a deepstream app to run indefinitely on an RTSP input or would it need periodic restarts ?. Currently we restart the app after every two hours and we would like to avoid this.

To reproduce this issue you could just let a deepstream app run till it crashes. It should crash with the time for how long it ran based on the model. The heavier the earlier I think

---

<div class="post-metadata">

**Author:** ![yingliu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yingliu/32/136703_2.png) [@yingliu](https://forums.developer.nvidia.com/u/yingliu)\
**Post date:** [June 17, 2022, 7:38am UTC](https://forums.developer.nvidia.com/t/possible-memory-leak-in-the-sample-apps/217985/2 "2022-06-17T07:38:26Z")

</div>

This is not the correct behavior, can you describe your pipeline in details?

Please also provide complete information as applicable to your setup.  
• Hardware Platform (Jetson / GPU)  
• DeepStream Version  
• JetPack Version (valid for Jetson only)  
• TensorRT Version  
• NVIDIA GPU Driver Version (valid for GPU only)  
• Issue Type( questions, new requirements, bugs)  
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)  
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)  
• The pipeline being used

---

<div class="post-metadata">

**Author:** ![Amycao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amycao/32/11342_2.png) [@Amycao](https://forums.developer.nvidia.com/u/Amycao)\
**Post date:** [June 20, 2022, 6:45am UTC](https://forums.developer.nvidia.com/t/possible-memory-leak-in-the-sample-apps/217985/4 "2022-06-20T06:45:12Z")

</div>

Did your app support rtsp reconnect? if not, when network unavailable, the pipeline will stop running. you can refer to deepstream\_source\_bin.c for rtsp reconnect.  
You also can monitor the memory usage if the issue caused by mem leak. please refer to [DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums](https://forums.developer.nvidia.com/t/deepstream-sdk-faq/80236/14), the script is for Jetson, but you can just have your attention on software memory usage if you are on dGPU. for dGPU, hardware memory usage, you can check nvidia-smi -l 1

---

<div class="post-metadata">

**Author:** ![yingliu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yingliu/32/136703_2.png) [@yingliu](https://forums.developer.nvidia.com/u/yingliu)\
**Post date:** [July 11, 2022, 4:51am UTC](https://forums.developer.nvidia.com/t/possible-memory-leak-in-the-sample-apps/217985/6 "2022-07-11T04:51:08Z")

</div>

**There is no update from you for a period, assuming this is not an issue anymore.  
Hence we are closing this topic. If need further support, please open a new one.  
Thanks**

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [July 25, 2022, 4:51am UTC](https://forums.developer.nvidia.com/t/possible-memory-leak-in-the-sample-apps/217985/7 "2022-07-25T04:51:24Z")

</div>

Closed on July 25, 2022, 4:51am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
