A 524 error indicates that Cloudflare made a successful TCP connection to the origin web server, but the origin did not reply with an HTTP response before the connection timed out. Review the suggestions in this Community Tip for troubleshooting ideas.
It sounds like whatever process you’re trying to run is taking longer than 100s to give a response. You’ll either need to speed that up or run it over an unproxied () hostname or directly to your origin IP.