Get the App
SLTechnology News&Howtos  ›  Servers  › 

Nginx reverse proxy has data duplicate insertion problems due to proxy_next_upstream

Shulou Source: shulou.com Published: 2022-06-02 07:40:55 11月11日 Update

Environment: Nginx is used for load balancing in front, followed by 2 Web servers

Reason: the system often appears to give users multiple settlement benefits.

Reason: due to the slow processing during the peak time of the settlement system and the long processing time at the time of settlement, it has exceeded the

Proxy_connect_timeout 30

Proxy_send_timeout 30

Proxy_read_timeout 60

Three times, and at the same time set

Proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_404; ensures high availability of the server

The upstream timed out and went to the next web server to handle it, but the previous process was still running, so it was settled many times.

Deal with:

1. Set proxy_next_upstream to off for partially settled interfaces

two。 Other interfaces are still set to proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_404; to ensure the high availability of the server

Tags: Settlement server processing service interface time system guarantee slowness equilibrium three reasons at the same time revenue time environment user cause process part Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei vpn NVidia Microsoft Shulou Information