Hi everyone ,
I hope you’re all doing well! I’m reaching out for some friendly advice regarding a challenge I encountered while deploying my Streamlit app on Google Cloud Platform’s App Engine.
In my app, I need to upload 3 or 4 files using st.file_uploader, but I keep encountering this error:
I was wondering if any of you could kindly assist me in finding a solution to this problem or suggest a workaround. Your expertise and input would be highly appreciated!
Thank you so much,
Hi there @M-ballabio1 ,
What is the size of the files? App Engine (and Cloud Run) have a request size limit of 32MB, so maybe that is what’s happening. In this scenario, a workaround that might help is compressing the files.
hi marduk ,
can i ask you if there is a way to increase the size limit of App Engine?
In alternative, is it not possible to create a buffering until all operations are done?
Unfortunately this is a hard limit in GCP. Search for “incoming bandwidth” in the documentation. And IIRC the Streamlit
st.file_uploader doesn’t have a buffering option, so the request will happen all at once.
Suggestions if you want to continue using App Engine / Cloud Run: compress the files or divide them into files smaller than 32MB. (For example, if your use case is creating DataFrames after uploading the files, pandas can actually read directly from some compression file formats).
Suggestion with no 32MB limit: deploy a VM with Google Compute Engine. Requires more configuration on your side but you have more control over the machine.
Hope this helps!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.