Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to increase CloudFlare time-out?

Is it possible to increase CloudFlare's time-out? If yes, how?

My code takes a while to execute and I wasn't planning on Ajaxifying it the coming days.

enter image description here

like image 201
kqw Avatar asked Jul 22 '16 22:07

kqw


People also ask

How do I increase 524 timeout in Cloudflare?

Enterprise customers can increase the 524 timeout up to 6000 seconds using the proxy_read_timeout API endpoint. If you regularly run HTTP requests that take over 100 seconds to complete (for example large data exports), move those processes behind a subdomain not proxied (grey clouded) in the Cloudflare DNS app.


1 Answers

No, CloudFlare only offers that kind of customisation on Enterprise plans.

  • CloudFlare will time out if it fails to establish a HTTP handshake after 15 seconds.
  • CloudFlare will also wait 100 seconds for a HTTP response from your server before you will see a 524 timeout error.
  • Other than this there can be timeouts on your origin web server.

522 on CloudFlare with SYN/ACK 522 on CloudFlare with ACK timeout

It sounds like you need Inter-Process Communication. HTTP should not be used a mechanism for performing blocking tasks without sending responses, these kind of activities should instead be abstracted away to a non-HTTP service on the server. By using RabbitMQ (or any other MQ) you can then pass messages from the HTTP element of your server over to the processing service on your webserver.

Pub/Sub IPC

like image 79
mjsa Avatar answered Sep 18 '22 21:09

mjsa