Jun 14th, 2009
Apache Error: Unable to open logs
Apache Error: Unable to open logs
Sometimes apache will fail to start. It will show the following error message in apache error logs:
Unable to open logs
This is because of the low number of file descriptors. Check the current limit of file descriptors in the file /proc/sys/fs/file-max:
1024
If fs.file-max is quite small (several thousands or so), it should be changed to a higher value.
If you want this new value to survive across reboots you can add it to /etc/sysctl.conf.
fs.file-max = 65535
To load new values from the sysctl.conf file:
Hint: Add `ulimit -n 65536` command to /etc/rc.d/init.d/httpd or /etc/init.d/httpd and /usr/sbin/apachectl apache startup scripts at the top.