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.
The Issue:
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!
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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.