Goal: Setting the Timeout after (ms) to 120000ms should allow the file upload to bypass the 10s limit.
Steps:
Create REST API in Resources folder
Hook up REST API (POST in this case) to Retools page and set Timeout after (ms) to 120000
Run query
Details:
Both REST API and QueryLibrary successfully uploads the file to Cloudflare R2, but return 503 in Retools whenever the query runs longer than 10 seconds. This happened on any files (image, audio, and webp) that was larger than 1mb.
A 503 error is coming from the Cloudflare R2 server, I would imagine that this server may need to be adjusted to keep the connection open for long enough to have the data upload from Retool to Cloudflare.
Are you able to manage this Cloudflare server? Are you able to test the uploads to Cloudflare with Postman to see if this is Retool specific or if large uploads from any source reach a Cloudflare time limit?
Hi Jack, thanks for helping me out here. So if I either directly upload or use a curl command to upload a file (25mb png in this case), the server does not timeout. So this is just happening on Retool
Ok that is odd, since you set the Timeout to be 120000ms that should not be happening.
If you are self hosted there might be another way to expand the time range.
But if the queries are getting cut off at 10 seconds it isn't getting anywhere near that range. Maybe there is some type of firewall or load balancer that has a time limit
I also noticed this is a query library query, could you test if a non-QL version of this query also hits the time limit and errors out? Let me know if you are on the cloud!
Thank you for the info, yes I believe that the GCP server may be causing this issue
I don't have a ton of experience with GCP for hosting cloudflare but I would definitely check their docs/forum to see what options in the settings can be changed or reconfigured to allow for their server to hold open the connection to finish processing the request from Retool
As I mentioned it may be a firewall or load balancer that is in the middle between Retool's server and the GCP server on the GCP end that is causing this unexpected behavior and sending out the 503 error.