Error 524 (Cloudflare timeout)

Hi,

I am using render to host a strapi app and i use gatsby on the front.
During deployment, i need to fetch a large quantity of data and receive an error 524. (30K+ pages)

I tried to run the same code without explicitly using Cloudflare domain(using render default url) but it seems Render is using Cloudflare on its own.

I already optimise my code to run my fetch by pagination to force connection between client/server but it seems to not be consider as a response by cloudflare.

I need to find a way to allow my fetch to run completely without timeout.
Any settings to be done on render ?

My setting:
Strapi 4.0.5
gatsby 4.6

Render: Web service standard

Thank you

Hi there,
Can you confirm where you are fetching the pages from? As part of the build itself? Also, to confirm we are using CloudFlare for all services on Render, see https://render.com/blog/free-ddos-protection -

Regards,

John B

@John_B when did you guys switch to using Cloudflare in front of Render?

Hi John,

I am using a render webservice to host my webservice
Then i am using a static website from render (also tried some alternative static hosting).
During the generation of the build of the frontend, multiple fetch are going to render webservice, however after 100sec of fetching, the build stop and return error 524.
My fetching include around 30 tables, where some have been tweak to fetch using pagination to avoid bursting the server. I have a few hundred API call at build and each call return value within 30sec but the whole process is about 3min fetching in a local environment

From all information i checked up to now, this error only appear on PROXIED (sub)domain and the 2 main fix are:

  • disable the proxy of the (sub)domain to simply use cloudflare as DNS
  • increase the timeout from 100 to a higher value (business account only)

On my side even if i create a subdomain and add a CNAME using DNS only, i am still getting error 524 i am still getting timeout since render itself is behind a proxy DNS record.

Using the same database (AWS) with same webservice hosted outside of cloudflare, i am able to complete the build without any error.

Any help would be appreciate.

The 524 error suggests that you’re not returning data within the 100s limit that CloudFlare has (https://community.cloudflare.com/t/community-tip-fixing-error-524-a-timeout-occurred/42342). I wonder if you could use the internal address of your webservice here in the build process so that traffic remains local and doesn’t need to exit and return via an external request?

John B