Streamlit App Crashes when running Apriori Algorithm

I am doing Market Basket Analysis on a Streamlit App that I created. As soon as the app starts running the mlxtend Apriori algorithm function to extract frequent itemsets for association rule mining the app crashes.

the last log output at the time of the crash is below:

/home/appuser/venv/lib/python3.9/site-packages/mlxtend/frequent_patterns/fpcommon.py:111: DeprecationWarning:
DataFrames with non-bool types result in worse computationalperformance and their support might be discontinued in the future.Please use a DataFrame with bool type

I am also getting this: “The service has encountered an error while checking the health of the Streamlit app: Get “http://localhost:8501/healthz”: dial tcp 127.0.0.1:8501: connect: connection refused”

Code Repo: Market-Basket-Analysis-on-the-Online-Retail-Data/MBA_App.py at main · kkrusere/Market-Basket-Analysis-on-the-Online-Retail-Data · GitHub
Streamlit App: https://kkrusere-market-basket-analysis-on-the-online-re-mba-app-oi5iot.streamlitapp.com/

Hi @kkrusere,

Thanks for posting!

It looks like your app was crashing due to a spike in memory usage (apps are limited to 3GB). I recommend checking out this blog post, which shares some great strategies for reducing memory use to avoid app crashes/resource limit errors.

Caroline :balloon:

Thank you for your response. I kinda figured that that might be the case. I’ll check out the post and see what I can do to reduce the memory usage.

Thank You,

Kuzi Rusere