V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Dcynsd
V2EX  ›  问与答

使用 Docker 部署 PHP 项目,经常 PHP -FPM 连接超时?

  •  
  •   Dcynsd · 273 天前 · 490 次点击
    这是一个创建于 273 天前的主题,其中的信息可能已经有所发展或是发生改变。

    项目使用 Docker 部署了一个容器,容器里面包含了 Nginx 和 PHP-FPM ,运行了一段时间后,Nginx 就会报错如下:

    upstream timed out (110: Operation timed out) while reading response header from upstream, client: 10.234.56.57, server: localhost, request: "POST /xxx/xxx/xxx HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000"
    

    重启容器就会正常,可是跑个一段时间后,又会报错,实在没找到是啥原因。

    2 条回复    2023-08-14 17:39:25 +08:00
    Rache1
        1
    Rache1  
       273 天前
    FPM 打开慢日志记录
    julyclyde
        2
    julyclyde  
       273 天前
    把 buffered output 关闭试试
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1701 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:45 · PVG 00:45 · LAX 09:45 · JFK 12:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.