间歇性错误404在更高负载期间。 (nginx的/ PHP / APC / MySQL的)

我有一个4GB的内核VPS与4GB RAM。 它使用nginx / 0.7.65,PHP 5.3.2和MySQL运行Ubuntu 10.04。 我使用php5-fpm与nginx进行通信。 我也有php5-apc与phpcaching恭维。

该系统运行四个网站,每天显示大约250万页面浏览量。

问题简介 – 加载页面时,站点将间歇性地显示错误404。 它可能发生在每个页面上,我可以坐下来一遍又一遍地刷新,平均每七到十次发生一次。

我试过了 – 更新Ubuntu和Nginx,使用PHP和Nginxconfiguration。 这个问题已经被复制到Ubuntu 11.10和nginx / 1.0.5。

值得注意的日志 – Nginx的error.log和access.log没有显示任何不寻常的事情,但是在404发布时做报告。 php5-fpm.log显示:
Nov 20 21:47:45.640003 [ERROR] [pool www] unable to retrieve process activity of one or more child(ren). Will try again later.
但我不相信这是与这个问题有关,正如我在以前的设置中看到的那样。

configuration(指向图像的链接以节省空间) – * APC设置,注意碎片:0%,caching完整计数为0. http://i.imgur.com/fV8hU.png * nginx.conf

 user www-data; worker_processes 4; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; use epoll; # multi_accept on; } http { include /etc/nginx/mime.types; server_names_hash_bucket_size 64; access_log off; #/var/log/nginx/access.log; sendfile on; #tcp_nopush on; keepalive_timeout 0; #keepalive_timeout 65; tcp_nodelay on; gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } 
  • 包含在nginx.conf中的典型站点configurationhttp://i.imgur.com/9Vmhj.png
  • 我的php5-fpm.conf是默认的,除了从pm.max_children = 10 pm.max_children = 30。
  • 我的php5configuration是默认的,只有编辑是与sendmail / postfix相关的
  • ulimit -n显示1024

有什么帮助 – 我从中获得的唯一的救济就是把这两个繁忙的地点之一搬到自己的VPS上。 显然,我很乐意拥有一个vps的所有网站,因为系统拥有足够的资源。 我在某处打开文件限制吗? 我很怀疑它可能有一些与php相关的东西。

很自信,这是一个configuration问题的地方。 不知道它可能是什么,并且在发布这个问题之前花了48小时试图研究。

升级到PHP> = 5.3.4应该有所帮助,因为它似乎已经被这个bug咬了: https : //bugs.php.net/bug.php?id=53028