我用 gunicorn+django 部署了一个项目。前端页面调接口 nginx 提示 error:
[alert] 8#8: *12811 zero size buf in writer t:1 r:1 f:0 000056152536F2F0 000056152536F2F0-000056152536F2F0 0000000000000000 0-0 while sending to client
nginx 配置如下:
ssl_certificate conf.d/letsencrypt/3481255__bolineyecare.com.pem;
ssl_certificate_key conf.d/letsencrypt/3481255__bolineyecare.com.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
charset utf-8;
expires +0d;
add_header Pragma "no-cache";
root /usr/share/nginx/html/collets_web/dist;
client_max_body_size 2000m;
client_body_buffer_size 2000m;
proxy_read_timeout 20m;
gzip on;
gzip_min_length 4k;
gzip_buffers 4 16k;
gzip_comp_level 6;
gzip_types text/plain application/x-javascript text/css application/xml application/javascript application/json;
gzip_vary on;
gzip_http_version 1.1;
# rewrite ^/$ /admin/ last;
location /api/purchasing/ {
proxy_pass http://127.0.0.1:9527/api/purchasing/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Cache-Control no-store;
client_max_body_size 2000m;
}
这两天 baidu 、google 都还没有找到问题。有一种说法是数据的问题。
1
hymzhek 2021-06-22 18:27:18 +08:00
|
2
hymzhek 2021-06-22 18:28:30 +08:00
|
3
longmeier90 OP @hymzhek 多谢提醒。我把 docker 里面的 nginx 版本 1.17.2 换成 1.17.3 就好了
|