File Uploader Widget throwing 'Network Error' when uploading files to a deployed Streamlit app

When we try to upload an image to our app deployed on the ECS (Fargate) Instance, the file uploader widget throws a network error many times.

image

When we first open the app, the first image works fine, it gets uploaded and the app finishes its run. The problem occurs after the first image. Sometimes the second image might upload fine or throw a network error (mostly this happens). Even if the second image uploads fine, the third, fourth, or fifth etc. will throw an error. After the error I cannot upload anything else unless I refresh the browser.

This problem does not occur locally. (I tried running the app 30-40 times, it never gave me a network error then)

PS: All our images are less than 10 MBs.

1 Like

Hi @dhruv1453, and welcome to the Streamlit community! :balloon::raised_hands:

Would it be possible to get our hands on the code for a review?

Thanks,
Charly

Sorry, we cannot provide the code, but we found a solution.

We later figured that it was an AWS timeout issue, and increasing the timeout worked, not giving anymore network errors.

Thank you

1 Like

Glad to hear that @dhruv1453 :raised_back_of_hand: