解决 ”upstream prematurely closed connection while reading response header from upstream“ 问题,运行环境为:nginx+uwsgi+django

摘要:此文章仅作为本人在部署过程中踩坑记录,项目背景为:此时我需要在django中admin页面添加一个按钮(此功能可参见我的另一篇文章),此按钮的功能为后端的一个函数,当点击此按钮时,后端会发送一个http请求,向一个网站发起链接,之后通过爬虫程序,将所需内容更新到后端的数据库中。
正文:
在项目整体部署完成后,每次在刚刚登录平台时,若立刻点击这个按钮,后台会出现 :upstream prematurely closed connection while reading response header from upstream 这个问题,中间为了解决这个问题,百度了不少资料,此处就不介绍了,最后通过排查,定位到是 uwsgi服务器的问题,通过在uwsgi.ini文件中添加配置项:

listen = 100buffer-size=65535

即可解决上述问题,当然根据本人这个项目中的需求来看,通过http连接的另一个平台因网络问题,有时会发生超时,导致nginx报错,此处可以修改nginx中超时等待的时间即可。

uwsgi服务器配置可以参考下面的链接:
参考链接:https://blog.csdn.net/wyfcode/article/details/86258232

解决 ”upstream prematurely closed connection while reading response header from upstream“ 问题,运行环境为:ngi相关推荐

  1. recv() failed (104: Connection reset by peer) while reading response header from upstream

    场景:为了得到用户在线等实时信息,在客户端做了个ajax轮训,每隔5秒请求一次: 用户量一上来,于是问题就来了,页面各种卡nginx日志文件 [root@iZt web]# tail -f /data ...

  2. nginx响应超时upstream timed out (110: Connection timed out) while reading response header from upstream

    问题描述 解决方法 提高nginx网络吞吐量buffers优化指令说明 nginx代理超时配置 nginx缓存区大小设置 问题描述 后台server服务响应时间正常,但是请求没有打到服务器,在ngin ...

  3. [temp]Nginx 错误502 upstream sent too big header while reading response header from upstream

    Nginx 502 Bad Gateway的含义是请求的PHP-CGI已经执行,但是由于某种原因(一般是读取资源的问题)没有执行完毕而导致PHP-CGI进程终止. Nginx 504 Gateway ...

  4. Nginx 错误502 upstream sent too big header while reading response header from upstream

    Nginx 502 Bad Gateway的含义是请求的PHP-CGI已经执行,但是由于某种原因(一般是读取资源的问题)没有执行完毕而导致PHP-CGI进程终止. Nginx 504 Gateway ...

  5. upstream sent too big header while reading response header from upstream

    年底了事情真多,club服务器有问必答 提交页面 提交出这个问题 The page you are looking for is temporarily unavailable.Please try ...

  6. nginx 502错误 upstream sent too big header while reading response header from upstream

    原本的设置是 proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; 在这种配置下,使用fiddler进行抓包分 ...

  7. nginx 错误502 upstream sent too big header while reading response header from upst

    原文参考:http://hi.baidu.com/wastorode/item/ec86ade6ac0af7a2c10d75f4 sudo gedit /var/log/nginx/error.log ...

  8. Connection prematurely closed BEFORE response reactor.netty.http.client.PrematureCloseException: Co

    一.最近在开发网关系统,就在感觉万事大吉可以上线的时候发现了如下的错误(这个是我在配置rabbitmq访问多个服务时发现的) Connection prematurely closed BEFORE ...

  9. 成功解决:http.client.RemoteDisconnected: Remote end closed connection without response

    成功解决:http.client.RemoteDisconnected: Remote end closed connection without response 问题描述 运行程序超时,有时可以正 ...

最新文章

  1. centos8编译openssl-1.0.2u、openssl-1.1.1k
  2. 海康威视 AI Cloud 软硬件平台
  3. Linux命令之df
  4. sql 将多个括号及内容删除_新浪微博将对逝者账号设置保护:不能登录、新发和删除内容...
  5. 什么是CRM中间件的1250事件
  6. 基于CSMA -CA协议的无线星型网络的应用案例介绍
  7. aspx是什么语言_什么是网页
  8. 前端解读控制反转(IOC)
  9. Interesting Finds: 2008.03.24
  10. 【机器学习】Bagging和Boosting的区别(面试准备)
  11. cfb为什么不需要填充_学日语为什么不需要准备,现在就可以学?
  12. git回滚命令reset、revert的区别
  13. Atitit 嵌入式tomcat 嵌入式服务器 attilax 你感觉艾提拉 总结 比起嵌入jetty ,文件可以自动刷新貌似还不错。。方便调试debug package com.attilax.
  14. 分析对象竞是我自己?我在 9 月上班划水 1510 分钟!
  15. Caused by: java.lang.IllegalStateException: Process 9461 exceeded cursor quota 100, will kill it
  16. python批量处理照片为可打印的黑底白字图片
  17. Somebody Loved
  18. 大数据与云计算、物联网三者的区别和关联
  19. SAP 打开总账科目
  20. 袋鼠云产品功能更新报告01期丨用诚心倾听您的需求

热门文章

  1. 小学奥数10道经典题
  2. RGBA-ABGR-RGB666
  3. JavaScript 学习笔记 - 挂载事件 Demo
  4. 《疯狂杀戮》NDS游戏完工
  5. 推荐系统学习笔记-PNN算法
  6. vue3.0 安卓和ios h5 移动端音频自定义圆环可拖拽播放(兼容微信浏览器)
  7. 宝尊电商公布2020年第三季度财报,任命于钧瑞为CFO
  8. jupyter :NameError: name 'clf' is not defined
  9. OpenMVstm32通信
  10. 昆仑镜Kunlun-M使用方法