美文网首页
[Errno 5] Input/output error

[Errno 5] Input/output error

作者: 毛毛_1e13 | 来源:发表于2020-06-02 15:59 被阅读0次
今天遇到一个问题阿里云服务器请求一个接口 (python写的) ,会时不时出现[Errno 5] Input/output error错误, 数据不能正常返回,网络查询后发现是因为代码中有 print(xxxx) 语句(浏览器中访问确实给出报错代码行数确实是print语句那行),直接删除,提交代码,重启nginx服务器:

关键问题来了 没起作用 还是时不时会出现报错

经过查询最后发现是因为我是nginx+Gunicorn 搭建服务器 所以也需要重启gunicorn 问题解决,下面是重启nginx 和gunicorn命令。

1.nginx重启

进入nginx目录 输入一下命令:
nginx -s reload

2.gunicorn重启

首先执行如下命令获取Gunicorn进程树:
pstree -ap|grep gunicorn
输入如下指令重启进程:
kill -HUP pid

相关文章

网友评论

      本文标题:[Errno 5] Input/output error

      本文链接:https://www.haomeiwen.com/subject/vdwuzhtx.html