Problem description

When you send POST requests to websites protected by Anti-DDoS Pro or Anti-DDoS Premium, 504 errors occur due to a long waiting period and the requests fail.

Cause

The time spent to process the POST requests exceeds the connection timeout period of Anti-DDoS Pro or Anti-DDoS Premium. As a result, Anti-DDoS Pro or Anti-DDoS Premium closes the connection.
  • The default timeout period for TCP connections is 900 seconds.
  • The default timeout period for HTTP and HTTPS connections is 120 seconds.

Solution

  • We recommend that you configure a heartbeat mechanism to process time-consuming requests at the application layer. This mechanism helps keep connections alive during the waiting time.
  • You can send occasional requests to backend ECS instances. These requests bypass Anti-DDoS Pro or Anti-DDoS Premium.