Memory release problem

I have a memory release problem。

I get the graph display by getting script connection to websocket, but I find that the memory has been growing with my access. What parameters do I need to configure to solve this problem

In addition, Django is used to embed bokeh

It’s unclear what you mean.

Does the memory consumption grow for the server or for the client?
Does it grow when you keep using the same document (i.e. same tab without refreshing it) or when you keep creating new documents (i.e. multiple tabs or same tab but refreshed multiple times)?

this is my demo :Share experience: bokeh is embedded in HTML server and supports Ajax requests the server_document

When I pass different parameters, server memory grows

Sorry, no idea - it seems to be tightly coupled with Django. And apart from simply forgetting it somewhat, I have also made a vow to never touch it again. :slight_smile:

You can try to create a memory profile of your Python server and see where the leak is. There’s plenty of guides online.
If you find that it’s within Bokeh code, please do let us know!

OK, let me check the memory usage