10月 162015
 
  1. nginx和php-fmp保持长连接的设置
    1. 参考: http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
    2. 设置
      keepalive 8;  //数字自己定吧,只要大于0就行,但是没有就不行

      fastcgi_keep_conn on;

  2. 关于单个连接同时处理多个请求的情况:
    1. fastcgi的设计来看,单个连接是可以同时传输多个请求的;对于多线程或事件驱动型fast-cgi server 是有一定好处的
    2. 对于特定的fastcgi-server,比如: php-fpm是不会同时处理多个请求的,所以fastcgi的该特性对于php-fpm是没有用的
    3. 问题: nginx何以知道后端的fastcgi-server是不能同时处理多个请求的?没有找到相关的nginx配置来告知nginx能否同时发送多个请求给相同的后端fastcgi连接; 难道nginx只能同时在一个连接上只分发一个请求?
 Posted by at 上午 10:55

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据