依次发送多个put请求时报错,任意单个put请求能够正常执行。
项目本地运行正常无报错,日志内正常记录put相关请求
部署在服务器上以uwsgi启动的项目中:
uwsgi的日志记录中执行了put相关请求但没有put请求相关记录,
django相同配置(与本地配置一致)的log记录文件中只记录了warning以上级别
org.springframework.web.client.ResourceAccessException: I/O error on PUT request for "http://:7000/v1": Unexpected end of file from server; nested exception is java.net.SocketException: Unexpected end of file from server
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:746)
1.修改process及threads为10,问题依旧存在
获取uwsgi正常的日志输出(展示put请求或者log中不再是以warning级别记录——django setting中我定义的是INFO级别但再服务器上用uwsgi启动则只输出warning以上级别日志),有助于我解决问题
这篇文章:uwsgi日志按天分割保存 也许有你想要的答案,你可以看看