有人可以帮我,我每隔几秒钟就得到502坏网关

服务器在debian上使用四核和3g ram在vps上运行

这是我在nginx日志中可以出现的错误:

2012/07/23 15:06:53 [错误] 2908#0:* 247 recv()失败(104:通过对等方重置连接)从上游读取响应头,客户端:81.255.98.253,服务器:www.acmslt . fr,request:“GET / category / culte / meetings / HTTP / 1.1”,上游:“fastcgi://127.0.0.1:9000”,主持人:“acmslt.fr”,推荐人:“http://www.google .FR / URL?SA = T&RCT = J&q = mosqu%C3%A9e%20de%20savigny%20LE%20temple%2077&源=幅和CD = 2&VED = 0CFsQjBAwAQ&URL = HTTP%3A%2F%2Facmslt.fr%2Fcategory%2Fculte%2Fconferences%2F&EI = OzANUOj0HYrG0QXusf2xCg&usg = AFQjCNHxw6lN8eBnkEOYDh5ONmutLiATHA“〜这里是nginx.conf

user www-data;
worker_processes 4;
events {
        worker_connections 1024;
       }

http {
     include mime.types;
     default_type application/octet-stream;

     # Hide the Nginx version number
     server_tokens off;

     # Tweeks
     sendfile on;
     tcp_nodelay off;
     tcp_nopush on;
     keepalive_timeout 5;
     client_body_timeout 10;
     client_header_timeout 10;
     send_timeout 10;
     client_max_body_size 8M;

     set_real_ip_from 127.0.0.1;
     real_ip_header X-Forwarded-For;

     gzip on;
     gzip_disable "MSIE [1-6].(?!.*SV1)";
     gzip_vary on;
     gzip_comp_level 3;
     gzip_proxied any;
     gzip_buffers 16 8k;

     include /etc/nginx/conf.d/*.conf;
     include /etc/nginx/sites-enabled/*;
  }

网站上的网站可用

server {
        listen 8080;
        server_name www.acmslt.fr acmslt.fr;
        location / {
        root /var/www/wordpress;
        index index.php index.html index.htm;
        # Rewrite rules
        if (!-e $request_filename) {
        rewrite ^(.+)$ /index.php?q=$1 last;
       }
       # Security
       # include global/security.conf;
       # W3 Total Cache
       include global/wordpress-w3-total-cache.conf;
       # PHP-FPM
       include global/php-fpm.conf;
       }
}

那么全局/ php-fpm.conf

# PHP scripts -> PHP-FPM server listening on 127.0.0.1:9000
location ~ \.php$ {
                   fastcgi_pass 127.0.0.1:9000;
                   fastcgi_index index.php;
                   include fastcgi_params;
                   fastcgi_connect_timeout 60;
                   fastcgi_send_timeout 180;
                   fastcgi_read_timeout 600;
                   fastcgi_temp_file_write_size 1M;
                   fastcgi_intercept_errors on;
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                  }

php-fpm www.conf

[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

谢谢

编辑这里是我在php-fpm.log中可以看到的

这是我在php-fpm日志中可以看到的内容

[23-Jul-2012 08:13:26] NOTICE: fpm is running, pid 631
[23-Jul-2012 08:13:26] NOTICE: ready to handle connections
[23-Jul-2012 08:40:04] WARNING: [pool www] child 646 exited on signal 11 (SIGSEGV)         after 1598.101386 seconds from start
[23-Jul-2012 08:40:04] NOTICE: [pool www] child 1354 started
[23-Jul-2012 08:40:04] WARNING: [pool www] child 1354 exited on signal 11 (SIGSEGV) after 0.191254 seconds from start
[23-Jul-2012 08:40:04] NOTICE: [pool www] child 1355 started
[23-Jul-2012 08:40:20] WARNING: [pool www] child 647 exited on signal 11 (SIGSEGV) after 1614.612810 seconds from start
[23-Jul-2012 08:40:20] NOTICE: [pool www] child 1356 started
[23-Jul-2012 08:41:05] NOTICE: Finishing ...
[23-Jul-2012 08:41:05] NOTICE: exiting, bye-bye!
[23-Jul-2012 08:41:05] NOTICE: fpm is running, pid 1937
[23-Jul-2012 08:41:05] NOTICE: ready to handle connections
[23-Jul-2012 08:51:43] NOTICE: Finishing ...
[23-Jul-2012 08:51:43] NOTICE: exiting, bye-bye! 
[23-Jul-2012 08:51:43] NOTICE: fpm is running, pid 2188
[23-Jul-2012 08:51:43] NOTICE: ready to handle connections
[23-Jul-2012 09:01:42] WARNING: [pool www] child 3934 exited on signal 11 (SIGSEGV) after 325.793784 seconds from start
[23-Jul-2012 09:01:42] NOTICE: [pool www] child 3983 started
[23-Jul-2012 09:01:44] WARNING: [pool www] child 2189 exited on signal 11 (SIGSEGV) after 601.533647 seconds from start
[23-Jul-2012 09:01:44] NOTICE: [pool www] child 3984 started
[23-Jul-2012 09:01:48] WARNING: [pool www] child 2190 exited on signal 11 (SIGSEGV) after 605.045174 seconds from start
[23-Jul-2012 09:01:48] NOTICE: [pool www] child 3986 started
[23-Jul-2012 09:01:55] WARNING: [pool www] child 3984 exited on signal 11 (SIGSEGV) after 10.610551 seconds from start