douzhuochao4027 2012-09-19 00:53
浏览 303
已采纳

php-cgi.exe在完全500次点击后退出

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_name\devel ginx
PHP: 5.4.7 c:\users\user_name\devel ginx\php5

Everything works fine except that after exactly 500 hits, my php-cgi.exe quits unexpectedly. No error logs, no events, nothing. It just dies after 500 hits...EVERY SINGLE TIME. I haven't found a single source of information online to help me on this. All the configuration seems valid and good. This is happening on two different machines (my development desktop and my notebook). I've tried different nginx.conf and php.ini files...still the same.

I just need to get a better idea on how to go about debugging this. Any suggestions?

  • 写回答

4条回答 默认 最新

  • duanqiao1880 2012-10-22 22:01
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题