php-cgi.exe quits after exactly 500 hits

前端 未结 4 1905
半阙折子戏
半阙折子戏 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:01

    The selected answer works, but doesn't allow the CGI server to shut down every so often (after 500 hits in the OPs case).

    Like the OP and others mentioned, this shutdown is necessary in a production environment to curtail memory leaks.

    In Windows, another solution is to create a batch file that looks like this:

    :start
        php-cgi -b 127.0.0.1:9000
        goto start
    

    This will allow the shutdown that was designed to occur, and will almost immediately start php-cgi again.

提交回复
热议问题