Increasing file descriptor limit
Hello,
The Apache server I'm administering has about 500+ virtual hosts on it (I know, it's alot, but the owner wants them all here), and it will not start due to the OS file descriptor limit being reached. I'm currently testing the solution on my virtual machine. Here is what I've done:
1. Edit /etc/security/limits.conf and add the lines:
* soft nofile 1024
* hard nofile 65535
2. Edit /etc/pam.d/login, adding the line:
session required /lib/security/pam_limits.so
3. Run the following:
echo 65535 > /proc/sys/fs/file-max
4. Run the following:
ulimit -n unlimited
From the info I've googled, the last command should set the limits to the hard limit specified in /etc/security/limits.conf. However, when I run it, I get the message:
bash: ulimit: open files: cannot modify limit: Operation not permitted
I'm logged in as root. I've also already checked the forums here, and most responses either include a file I don't have (I'm on Fedora Core 4) or include the aforementioned steps (in whole or in part).
If anyone could shed some light here, I'd be grateful.
Thanks,
TWR
|