Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nginx reverse proxy has data duplicate insertion problems due to proxy_next_upstream

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report