When a visitor clicks Submit, Contact Form 7 sends an AJAX request to admin-ajax.php or the REST endpoint. The web server acts as a reverse‑proxy and forwards the request to the PHP‑FPM process. If the proxy does not receive a valid response, it returns a 502 Bad Gateway status.
This situation occurs when the PHP process crashes, exceeds its timeout, or is blocked by a firewall rule. It also appears if a CDN or security layer cannot reach the origin server, or if a plugin aborts execution before the response is generated.
The result is a red error banner on the form, no email delivery, and a 502 status in the browser’s network panel. The rest of the site continues to load because only the AJAX call fails.