1. The frontend response timed out, with a response time of 1 m 0.06 s. See Figure 1.

HTML
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty/1.19.9.1</center>
</body>
</html>2. The backend interface response did not time out, with a response time of 1 m 5.70 s. See Figure 2.

3. Adjust the proxy settings by adding 3 timeout-related settings. The default is 60s, and all are adjusted to 300s.
Nginx
location /api {
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
proxy_pass https://xxx-backend.local/api;
}
4. After restarting Nginx, request the frontend again in the browser, and it no longer times out. The response time is 1.4 minutes. See Figure 3.

