使用PHP 5.4.40 FPM / Worker,Apache服务器暂时在Amazon Linux上使用Apache 2.4.12停止服务请求

我们有一个apache服务器不断的服务请求,由于以下错误:

(70007)The timeout specified has expired: [client xxx.xxx.xxx.xxx:33740] AH01075: Error dispatching request to : (polling), referer: https://www.google.com/ [proxy_fcgi:error] [pid 12363:tid 139906999342848] [client xxx.xxx.xxx.xxx:6318] AH01067: Failed to read FastCGI header 

似乎不pipe我们做什么,这不断发生,我已经尝试在php.conf中设置超时:

 # # Cause the PHP interpreter to handle files with a .php extension. # RequestReadTimeout header=180 body=180 <FilesMatch \.php$> SetHandler "proxy:unix:/var/run/php-fpm/php5-fpm.sock|fcgi://127.0.0.1 timeout=1800 connectiontimeout=1800" </FilesMatch> <Proxy "unix:/var/run/php-fpm/php5-fpm.sock|fcgi://127.0.0.1" timeout=1800 connectiontimeout=1800> ProxySet timeout=1800 connectiontimeout=1800 </Proxy> <Proxy "fcgi://127.0.0.1"> ProxySet timeout=1800 connectiontimeout=1800 </Proxy> #<FilesMatch \.php$> # SetHandler application/x-httpd-php #</FilesMatch> # # Allow php to handle Multiviews # AddType text/html .php # # Add index.php to the list of files that will be served as directory # indexes. # DirectoryIndex index.php # # Uncomment the following lines to allow PHP to pretty-print .phps # files as PHP source code: # #<FilesMatch \.phps$> # SetHandler application/x-httpd-php-source #</FilesMatch> 

从我们的mpm-worker.conf文件中:

 <IfModule worker.c> ThreadLimit 60 StartServers 5 MaxClients 60 ServerLimit 60 MinSpareThreads 10 MaxSpareThreads 250 ThreadsPerChild 60 MaxRequestsPerChild 500 MaxRequestWorkers 300 </IfModule> 

从我们的虚拟主机文件:

 <VirtualHost *:80> LimitRequestBody 0 RewriteEngine On RewriteOptions InheritBefore DocumentRoot "/var/www/html" ServerName xxxxx.com </VirtualHost> 

PHP_FPM www.conf:

 [www] listen = /var/run/php-fpm/php5-fpm.sock listen.allowed_clients = 127.0.0.1 listen.backlog = 10240 listen.owner = apache listen.group = apache listen.mode = 0666 user = apache group = apache pm = dynamic pm.max_children = 60 pm.start_servers = 20 pm.min_spare_servers = 20 pm.max_spare_servers = 60 pm.max_requests = 500 ;pm.status_path = /status ;ping.path = /ping ;ping.response = pong rlimit_files = 10240 rlimit_core = unlimited request_terminate_timeout = 180s php_admin_value[post_max_size] = 64M 

Apache的超时设置为180。 php.ini有default_socket_timeout = 180

内存使用情况:php_fpm:

 ps -ylC php-fpm | awk '{x += $8;y += 1} END {print "PHP-FPM Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}' PHP-FPM Memory Usage (MB): 5121.8 Average Proccess Size (MB): 62.4609 

阿帕奇:

 ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}' Apache Memory Usage (MB): 319.66 Average Proccess Size (MB): 39.9575 

记忆:

  total used free shared buffers cached Mem: 7483 6141 1342 6 44 945 -/+ buffers/cache: 5150 2332 Swap: 0 0 0 

我读了一篇关于补丁的文章,但是在超时问题上,它并不适用于我们的Apache版本。

MySQL和Memcached在其他服务器上运行。

有任何想法吗?