【发布时间】:2022-11-04 18:13:45
【问题描述】:
每当我在Phalcon 4 应用程序中抛出异常时,我都会收到 502 bad gateway。我正在使用实现Throwable 接口的默认PHP Exception 类。
throw new Exception ("Some error message here", 500);
我浪费了很多时间,看了所有关于这个问题的帖子,但找不到解决方案。
当我检查我的 nginx 日志时,它总是说
Connection reset by peer while reading response header from upstream
有时(15%)它会抛出异常并给我消息,但大多数情况下它只显示 502。
我很确定它与我的代码无关,因为如果是这种情况,那么它有时甚至不应该工作。
【问题讨论】:
标签: php nginx phalcon fastcgi fpm