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提示
检查发现是自己不小心开启了监听。关闭就行了