Dash memory leak - Close tab or window

Hi everyone,

Thanks to the whole forum, I created an application that runs heavy simulations and shares graphics.
I dockerized the application, and run the container.

The container memory usage increases for each new tab of my application. However, if I close the tab, the memory usage does not decrease. I feel like the page keeps running serverside instead of closing.

I have not found any resources about this issue. Does anyone know how to handle the tab/window closing event and how to cut the process?

I tried changing the server behaviour by setting server.permanent_session_lifetime and session. permanent. It does not seem to have any effect.


1 Like

Have you been able to solve this? I am getting the same issue

This library crashes my code :frowning:

I did find out what the issue was though, I was calling app.run_server(debug=True) in my container, changing debug to False fixed the buildup


What does the unload component do in this case?

1 Like

any update on this?

debug=False did not alleviate my problem.

Bumping because I just asked about this exact issue.

Experimenting with the debug=False and will report back if it solves it.

Make sure that you arent accumulating global variables and not printing to the python console during runtime as both of these things will lead to memory leaks.