Why php5-fpm post requests are slow, while same php-cli code/console curl works extremely fast?

后端 未结 2 794
南方客
南方客 2021-02-04 03:22

I am performing POST request to local api web service (via LAN) with dummy method, that works very fast itself (less then a second).

Problem is that if i use php5-fpm it

2条回答
  •  别跟我提以往
    2021-02-04 03:49

    One thing I've noticed on my own instance of FPM (using Nginx) is that I will not get interim output. I've never bothered to investigate this as it has never mattered for my own usage needs (small units of work with little output).

    In your case, perhaps the response is being sent quickly but the connection is kept alive -- causing the recipient to wait around for more data that never arrives. You may be able to check on this by investigating server side logging to check response times from the server's point of view.

提交回复
热议问题