The question is does it take that long because the query simply takes that long or because their servers are overloaded. If it is the former you will need to optimise that query, if it is the latter they need to fix that.
The timeout simply happens because the answer takes too long and Cloudflare closes the connection.
Well, fetching the db might take it’s time and i have been trying to pause Cloudflare for this task without success.
Is there no possibility to bypass CF for this task? I need to do it just once all 6 months or so.
Pausing should do the trick, however you’d need to wait until the DNS records actually point to your server. You could keep a “secret” host which keeps pointing to your server ( instead of ), in this case you wouldnt need to pause anything and could directly access your server whenever necessary, just keep in mind this might also reveal your IP address - if that is of concern.
Alternatively you could optimise the query or split it into chunks.