我的Apache正在抛出内部服务器错误500错误并记录如下:
> [Sun Apr 07 23:35:24 2013] [error] [client 124.162.30.45] (2)No such
> file or directory: FastCGI: Failed to connect to server
> "/home/magda_00aa/sportxxx.pl/sportxxx.pl.0fake": socket file
> descriptor (1063) is larger than FD_SETSIZE (1024),you probably need
> to rebuild Apache with a larger FD_SETSIZE,referer:
> http://www.surf4web.com/surfing.PHP?id=haoduodeng2012
我已经提升了内部的FD限制:
cat /usr/include/bits/typesizes.h | grep FD
#define __FD_SETSIZE 65536
和
cat /usr/include/linux/posix_types.h | grep FD_SETSIZE
#undef __FD_SETSIZE
#define __FD_SETSIZE 65536
#define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS)
并且
/sbin/sysctl fs.file-max
fs.file-max = 512000
ulimit -n
1000000
但它没有帮助.如果超过350个虚拟主机,我的Apache仍会崩溃:/
我在CentOS 5.9 64位 – 内核3.0.65-1.el5.elrepo