Dash Memory Buildup

Hi All,

I wrote a Python Dash app and made it available within my organization using OpenShift. I’m not really knowledgeable about OpenShift but it seems to be running correctly, including when multiple users are involved.

My problem is with memory management. Each time a user initiates a new session, the memory used by Dash app increases by ~200MB when I look on OpenShift. When the user closes the browser tab, the consumed memory does not go down (not even after weeks). Essentially the amount of memory the Dash app consumes keeps growing.

I am probably missing something, but how do I get Dash to clear memory after the user closes the browser tab or after some time passes since the last action? The dcc.Store objects in my code have "storage_type = ‘memory’ ". But from what I understand the dcc.Store keeps all the stored data on the client side in the browser, so this should not increase the memory on the server.

I deployed my app with “app.run_server(debug=True, dev_tools_hot_reload=False, port=8080, host=“”)” in case this matters.

Any help would be really appreciated! Right now I keep manually restarting the app to clear the memory but this is not practical at all. Thank you!


I never used OpenShift, so take it with a grain of salt because it could be something very “platform-specific”…

Are there any objects that are loaded and persisted in memory when each user starts a session? Something like user-specific data, saved in a “global” variable…