Error which downloading a csv file (300mb or more)

Locally deployed:
Enough memory in the backend
config is set to [server] maxMessageSize = 3000
Error:

MessageSizeError: Data of size 306.2 MB exceeds the message size limit of 200.0 MB.

This is often caused by a large chart or dataframe. Please decrease the amount of data sent to the browser, or increase the limit by setting the config option server.maxMessageSize. Click here to learn more about config options.

using st.download_button

what else can i used to download larger dataframes to csv

Use the Streamlit cloud paid service, use another hosting provider, or make your app used chunking/paging or streaming data if possible.

using Kubernetes

i have the config setup to [server] maxMessageSize = 3000

why would i get this MessageSizeError : Data of size 306.2 MB exceeds the message size limit of 200.0 MB.

will href download link be better than a download_buttton??

Is the limit set in the app’s local .streamlit config or the global one?

Local .streamlit

How to make it global?