File upload time-out

I’m trying to upload files in my django app on fly.io but the the files are large and takes time I receive a time-out error. How can I handle this? Is Thera e procedure to upload large files in fly?

I doubt there is generic advice that would apply. I have a Rails app deployed to fly.io where a user uploaded a 164MB file successfully.

The problem is not the file size but the time it takes to upload. A bandwidth issue. It seems to have a 30s time-out.

60 second timeout for HTTP server - #2 by jerome

I suspect that the limit you are seeing is elsewhere. For example:

Command line: -t INT or --timeout INT

Default: 30

Workers silent for more than this many seconds are killed and restarted.

Value is a positive number or 0. Setting it to 0 has the effect of infinite timeouts by disabling timeouts for all workers entirely.

Settings — Gunicorn 22.0.0 documentation

The connection is broken after 30s during the file upload. When the file is smaller and takes less than 30s everything works.

I just uploaded the file I mentioned previously, this time to a fly.io server running in the iad region. It took 148.013 seconds to do so. The upload completed successfully.

My stack is nginx + passenger + rails + active storage. What is your stack?

My stack is just Django + Gunicorn. Uploading to the file system.
My app needs the file for processing and then it’s discarded, I don’t need to keep the file.
But it never gets updloaded in full due to this problem.

And Gunicorn defaults to a 30 second timeout. See the link to the documentation I provided above.

Yes. I tried to increase but it didn’t work. Perhaps I’ve missed sometring. I’ll try again.
Thanks for the help.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.