Py学习  »  NGINX

nginx 502错误一致,没有应用程序错误

kausal_malladi • 4 年前 • 896 次点击  

几天前我突然遇到一个奇怪的问题。

我的应用程序已经运行了很长一段时间,没有问题。突然间,我发现有502个错误一直存在。我们以每分钟50000个请求的速度运行,平均服务器响应时间为12毫秒。

没有应用程序死机(错误),nginx config也允许多达10000个工作连接。

其他配置。。

sendfile        on;
keepalive_timeout  600;
server_tokens off;
client_max_body_size 20m;

有人能帮我指明解决问题的方向吗?我得到了下面的一个错误,大部分是下面的第一个(sendfile())。

2019/08/16 15:01:42 [error] 30#0: *60729 sendfile() failed (32: Broken pipe) while sending request to upstream, client: <IP>, server: <hostname>, request: "POST <endpoint> HTTP/1.1", upstream: "http://127.0.0.1:8080/<endpoint>", host: "<hostname>"

2019/08/16 15:01:45 [error] 30#0: *60821 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP>, server: <hostname>, request: "POST <endpoint> HTTP/1.1", upstream: "http://127.0.0.1:8080/<endpoint>", host: "<hostname>"

2019/08/16 14:55:27 [error] 20#0: *42152 upstream timed out (110: Connection timed out) while reading response header from upstream, client: <IP>, server: <hostname>, request: "POST <endpoint> HTTP/1.1", upstream: "http://127.0.0.1:8080/<endpoint>", host: "<hostname>"

我们使用的是golang和gin框架,如果它有助于调试的话。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/52893
 
896 次点击  
文章 [ 1 ]  |  最新文章 4 年前