Is it possible to increase CloudFlare time-out?

kqw picture kqw · Jul 23, 2016 · Viewed 43.2k times · Source

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

Answer

mjsa picture mjsa · Jul 27, 2016

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