Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Issues with Panel app #1399

Closed
vntkumar8 opened this issue Jun 11, 2020 · 5 comments · Fixed by #1407
Closed

Memory Issues with Panel app #1399

vntkumar8 opened this issue Jun 11, 2020 · 5 comments · Fixed by #1407
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@vntkumar8
Copy link

vntkumar8 commented Jun 11, 2020

Hi,
I have built a panel app. When I connect to my app via the browser, the app is executed and takes up some memory. When I close the tab, open another tab and connect again, the memory used increases. If I keep doing this, the memory consumption keeps increasing until the machine runs out of memory.
I have attached a diagnostic plot that shows memory usage, I connected via one browser, closed it then commented few others then closed them also. But memory doesn't return to baseline.
image

Any workarounds for this memory consumption issue?

@philippjfr
Copy link
Member

I'd have to see more details about your app. Sessions should definitely be cleaned up after you close the browser, but it may take a little (like a minute or two). Based on that plot that doesn't seem to be happening in your case.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Jun 11, 2020
@vntkumar8
Copy link
Author

A Small example

#!/usr/bin/env python
# coding: utf-8

# In[57]:


import pandas as pd
import numpy as np
import panel as pn
import hvplot.pandas

import holoviews as hv

import requests
import requests_cache
import gc
import csv

import colorcet as cc
from colorcet.plotting import swatch

from pandas_cache import pd_cache

pn.extension()

gc.enable()


# In[58]:


df = pd.DataFrame([81,9,2,12,213,2312,123,12,13213,13213,1767,5665,345])


# In[59]:


barplot = df.hvplot(kind='bar', responsive=True, height=300).opts(color='Green',
                                                            xlabel='Week', ylabel='%',xrotation=45,
                                                            axiswise=True, toolbar='above',
                                                            default_tools=['save','zoom_out','reset'] 
                                                            )


# In[60]:


dash = pn.Tabs(pn.Pane(barplot))


# In[61]:


dash.servable()


# In[ ]:




panel serve example.py --num-procs 1 --log-level debug --mem-log-frequency 15000

You will find that documents and models remain uncollected.

@philippjfr
Copy link
Member

Thank you!

@philippjfr
Copy link
Member

#1407 should fix these issues. I'm now debating whether to backport part of that fix and release 0.9.6 or wait for 0.10.0.

@jbednar
Copy link
Member

jbednar commented Jun 12, 2020

In the meantime, can you tag a dev release so that we can evaluate this fix on our deployments?

@philippjfr philippjfr added this to the v0.9.6 milestone Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants