dzdh
V2EX  ›  问与答

分享&提问一个疑似 BUG 语言: PHP ,框架: Laravel Nginx 499 但是程序执行日志没问题

  •  
  •   dzdh · Apr 30, 2021 · 1205 views
    This topic created in 1930 days ago, the information mentioned may be changed or developed.

    Nginx 日志记录:499 客户端关闭,request_time 30s+

    PHP & Laravel 记录的日志: 早已结束,并输出了数据

    nginx 没开 fastcgi|proxy_ignore_client_abort

    问题还可能出在哪里

    4 replies    2021-04-30 13:23:30 +08:00
    sujin190
        1
    sujin190  
       Apr 30, 2021
    我猜大概率是你域名备案有问题,被云服务上掐了
    superrichman
        2
    superrichman  
       Apr 30, 2021 via iPhone
    “老子点餐点了 30 秒还不送过来!什么辣鸡饭店!走了!”( client 客人扔下一个 499 骂骂咧咧地走了
    php 厨师花了 31 秒炒完菜,送给 nginx 服务员,但客人已经走了。服务员懵了,把菜给扔了。

    掌柜清点财务,发现少了一份菜,但没收到钱,问题出在哪呢?
    whileFalse
        3
    whileFalse  
       Apr 30, 2021
    后端在执行的时候浏览器主动终止链接,Nginx 就会记录 499 这个 status code
    通常是因为后端响应太慢导致的。
    dzdh
        4
    dzdh  
    OP
       Apr 30, 2021
    @superrichman
    @whileFalse

    实际情况是,测试的 PHP 程序日志记录显示是在 1.xs 左右就已经完成并给出了 response 。然后还 499 就比较懵逼。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   922 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 20:56 · PVG 04:56 · LAX 13:56 · JFK 16:56
    ♥ Do have faith in what you're doing.