Nixpacks max file upload size?
I have a node app (Directus CMS) hosted on Railway using Nixpacks for the build. There is a setting within directus for
MAX_PAYLOAD_SIZE
and FILES_MAX_UPLOAD_SIZE
I have set both to 250mb, however I still get errors and can't upload a 200mb file. I am wondering if there is any limits on the web server that Nixpacks use (is it nginx? Or internal Docker webserver?) I can't find any documentation on how exactly the app is served in terms of the web server.10 Replies
Project ID:
221f9f8d-d6be-49c4-895a-9b03deb01c63
221f9f8d-d6be-49c4-895a-9b03deb01c63
what errors do you get
Solution
theres no file size limit for uploads, but there is a 5 minute time limit
Ah I think the 5 min time limit explains it, the upload is 200mb, it got to around 50% and then I get Network error ERR_CONNECTION_RESET after around 5mins. Is it normal a file this size could take > 5mins or possibly optimisation needed in the app? I'm uploading from UK if that matters.
Just to clarify, is there throttling/limiting going on your side? My upload speed is 20 Mbps so I guess 200mb file should be done in less than 5 mins
Ok I think I got to the bottom of the problem, when the file is sent to the Railway app, it is then uploaded to AWS S3 before the server sends the response back. I can see the upload to S3 is actually taking 3mins to upload the file so between the initial upload time and the time it takes to upload to s3 I hit the timeout.
Is it possible to increase the 5min timeout?
it is not, and fly even has a 4 minute timeout
you can test your upload speed to railway here
https://utilities.up.railway.app/upload
Ok fair enough, thanks for the info - that is useful. My app needs to be able to upload large files on slow internet connections 😅 so I guess i need to look into some sort of chunking/multipart upload method to avoid timeouts
(looking into it more, it seems S3 also has a 4 min timeout so can't even directly upload to them from the client side!)
a signed url from s3 has a 4 minute upload limit too?
I can't really find much info about timeouts, just saw one page that suggested 4 mins but can't see anything specific about timeouts for signed urls. It just suggests to use a multipart upload
ah well I'm glad I could provide some information