ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nginx + зависание php-fcgi


  • To: nginx-ru@xxxxxxxxx
  • Subject: nginx + зависание php-fcgi
  • From: Mykhail V Diordienko <mixa.dior@xxxxxxxxx>
  • Date: Sun, 15 Nov 2009 16:17:24 +0200
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:organization:x-mailer:mime-version:content-type :content-transfer-encoding; bh=yjbJRhbfIP7v9KAT0WoV0lwiheMqT7jvXZyle6wcKu4=; b=dF1bLylHW6MWB+nhn3K19TBYu79YUSfx7SK4MjdfK8Y650VMkpdVlY+TPeVidSL1n4 dA8XI3ljX8YDDrTNDF9ZDVK/p/ToL9aufVaS9qPSgeKdS3yE6XRyCmxCYOPrflJGz2Lo O52kfagQyMOevWLEzB9p2NZ8nyqt8UXA43/h8=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:organization:x-mailer:mime-version :content-type:content-transfer-encoding; b=LgCjmfI2XkJAw3l845kb9drgwZs2ho8FYkkgm0TkgYrNbTe/Bn2yzejeCuRoL7TZ7G DLsGs4m2UxLz2aRZiOhli2qy1HyvUXdT8jGlz6zFvmro2X12b4C2kKVz3KRQLbWlTjFx 6gkWUtbblwRtCpxwlb8INqrIMPTp1UmwFT/es=
  • Organization: home

Всем доброго дня,
Есть debian lenny, nginx 0.7.63 , php 5.2.11dotdeb , spawn-fcgi 1.6.3
Частенько один из процессов php-cgi зависает и виден через ss в статусе
root@vps_182:/usr/local#ss
State  Recv-Q Send-Q    Local Address:Port  Peer Address:Port    
CLOSE-WAIT  9 0 127.0.0.1:9001 127.0.0.1:52834  

Скрипт запуска spawn-fcgi
#!/bin/sh
PHP_FCGI_MAX_REQUESTS=300
killall -9 php5-cgi
/usr/local/spawn-fcgi/bin/spawn-fcgi -a 127.0.0.1 -p 9001 -u
arteveryday -C 2 -f /usr/bin/php5-cgi

Процесс висит похоже висит пока не отработает свои
PHP_FCGI_MAX_REQUESTS.  Load average при этом 1. Что делать? как
лечить? 
заранее спасибо!



Конфиг nginx:

user  www-data;
worker_processes  3;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;  

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}                            


http {
    client_max_body_size 512M;
    include       mime.types; 
    default_type  application/octet-stream;
    limit_req_zone  $binary_remote_addr  zone=one:10m   rate=2r/s;
                                                                  
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '            
    #                  '"$http_user_agent" "$http_x_forwarded_for"';          

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }                               

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #                                                         
        error_page   500 502 503 504  /50x.html;                  
        location = /50x.html {                                    
            root   html;                                          
        }                                                         

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #                                                          
        #location ~ \.php$ {                                       
        #    proxy_pass   http://127.0.0.1;                        
        #}                                                         

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #                                                                   
        location ~ \.php$ {                                                 
            root           html;                                            
            fastcgi_pass   127.0.0.1:9000;                                  
            fastcgi_index  index.php;                                       
            fastcgi_param  SCRIPT_FILENAME  /var/www/test/$fastcgi_script_name;
            include        fastcgi_params;                                     
        }                                                                      

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one                                 
        #                                                          
        #location ~ /\.ht {                                        
        #    deny  all;                                            
        #}                                                         
    }                                                              


    # another virtual host using mix of IP-, name-, and port-based configuration
    #                                                                           
    server {                                                                    
        listen 80;                                                              
        server_name munin.tyty.ggg.org.ua;                                      
        location / {                                                            
            root /var/www/munin;                                                
            index index.html;                                                   
        }                                                                       
    }                                                                           
                                                                   
                                                                         
     server {                                                               
        listen       80;                                                    
                                           
        server_name  arteveryday.org www.arteveryday.org arteveryday.com.ua 
www.arteveryday.com.ua arteveryday.ru www.arteveryday.ru;

        location / {
            root   /var/www/arteveryday;
            index  index.html index.htm index.php;
            include /usr/local/nginx/conf/wp_super_cache;
        }                                                
        location ~ .php$ {                               
            include /usr/local/nginx/conf/fastcgi_params;
            fastcgi_pass   127.0.0.1:9001;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  
/var/www/arteveryday$fastcgi_script_name;
            fastcgi_param  QUERY_STRING     $query_string;
            fastcgi_param  REQUEST_METHOD   $request_method;
            fastcgi_param  CONTENT_TYPE     $content_type;
            fastcgi_param  CONTENT_LENGTH   $content_length;
        }


    }



}



 




Copyright © Lexa Software, 1996-2009.