php-cgi.exe quits after exactly 500 hits

前端 未结 4 1895
半阙折子戏
半阙折子戏 2020-12-25 10:31

For the life of me, I can\'t figure this out.

This is my development machine setup:

Windows 7 Home Premium 64 bit,
Webserver: NGINX 1.3.6 c:\\users\\user

4条回答
  •  天涯浪人
    2020-12-25 11:05

    I finally figured it out. Maybe it was simple enough that I couldn't find the solution.

    Adding:

    SET PHP_FCGI_MAX_REQUESTS=0 
    

    to the command file that launches the php-cgi.exe fixed it. I guess it defaults (when not set) to 500 hits before FCGI is killed.

    Obviously, there are good reasons for this and as GargantuChet has suggested, settings things up correctly and letting the instances of PHP managed and auto-spawn is a better way to go...but for people who want a quick windows development environment, this can solve some problems.

提交回复
热议问题