phpstudy nginx 报错upstream prematurely closed connection while reading response header from up

phpstudy nginx 报错upstream prematurely closed connection while reading response header from up

早上在日常开启本地环境,打开网站时发现报错502在这里插入图片描述
就很疑惑昨天还好好的,今天开机就不行了。然后查看nginx的日志发现报错upstream prematurely closed connection while reading response header from up。
翻译后Upstream在从Upstream读取响应头时过早关闭连接。

百度看原因也有说明是因为端口被占用的可能。于是cmd查看了端口是被哪个进程占用的。

netstat -aon|findstr "9000"

显示是有进程在用.
在这里插入图片描述
通过任务管理器查看进程发现是phpstorm占用的
在这里插入图片描述
关闭phpstorm后重启发现没有问题了。
再次打开发现phpstorm提示
在这里插入图片描述
检查发现是自己不小心开启了监听。关闭就行了
在这里插入图片描述


版权声明:本文为qq_39801208原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。