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

Unable to upload >980 files using file_uploader #8534

Open
4 tasks done
keyfayaz opened this issue Apr 18, 2024 · 2 comments
Open
4 tasks done

Unable to upload >980 files using file_uploader #8534

keyfayaz opened this issue Apr 18, 2024 · 2 comments
Labels
feature:st.file_uploader status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working

Comments

@keyfayaz
Copy link

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

We have an application where we process a set of files, sometimes more than 2000.
The file_uploader widget hangs, then eventually produces a network error when the number of images exceeds 980.

This issue wasn't previously occurring. We did run into one issue where we had to increase the Python recursion limit since we iterate over each file and the default Python recursion limit is 1000 (I assumed ~20 or so iterations went to setup/config), and would produce an error. So we set the recursion limit to the number of files uploaded + 50.

Now, the file_uploader widget fails to upload >980 files. 980 works fine, and 981 uploads all but one. I looked at the source code and didn't see any upper limit defined for this operation. Logs don't show anything besides hanging until there are exactly 980 files, at which point it returns the list of uploaded files and continues executing the script.

Wondering if internally the recursion limit is being met, and might need to be increased.
Otherwise, please help us determine why we are now running into this issue. We were previously using streamlit version 1.29.0, and upgraded to 1.33.0 to find the issue still persists.

Thank you!

Reproducible Code Example

No response

Steps To Reproduce

No response

Expected Behavior

980 files upload successfully

Current Behavior

980 files upload successfully, the remainder hang and eventually produce a network-related error

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.33.0
  • Python version: 3.12.2

Additional Information

No response

@keyfayaz keyfayaz added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels Apr 18, 2024
Copy link

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

@keyfayaz
Copy link
Author

I forgot to mention - we initially thought it is related to the server running out of memory as I was not able to reproduce it locally at first. Increasing the server's memory did not help, and now it occurs locally as well, which indicates that it is likely related to streamlit. Investigating further drew me to the file_uploader widget, and now finding that it is directly related to the number of files being uploaded, which we did not have an issue with before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.file_uploader status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants