error "Too many open files" after apache update
Hello,
I used CPanel/WHM 96.0.9 on CentOS 7.
Today Apache webserver and few other rpm's was updated. From yum.log:
--
Jun 02 20:38:49 Updated: ea-apache24-2.4.48-1.1.1.cpanel.x86_64
--
After update Apache was not started. In the error log I see:
--
[Wed Jun 02 20:46:20.415917 2021] [log_config:error] [pid 27684] (24)Too many open files: AH00649: could not open transfer log file /etc/apache2/logs/domlogs/xxxxxx.com. AH00015: Unable to open logs
--
I was able to run the server when I switched on piped logs for apache. But it is not seems a real fix.
I see number of opened files limited to 4096.
--
# ulimit -n
4096
--
I see files /etc/bashrc and some other chenged today. Some ulimit directives was added.
Can someone please explain how to increase number of open files for apache?
-
Hello I did fix it by running the following in SSH: [CODE=bash]mkdir /usr/lib/systemd/system/httpd.service.d printf "[Service]\nLimitNOFILE=40000" > /usr/lib/systemd/system/httpd.service.d/limits.conf systemctl daemon-reload /scripts/restartsrv_httpd --hard
As instructed on How to increase the number of open files allowed for Apache on CentOS 7. Kind regards Werner AlfaNet bv0 -
My another server with 200+ account also failed after update. I have investigated Cpanel docs and found solution: -- mkdir /usr/lib/systemd/system/httpd.service.d echo -e "[Service]\nLimitNOFILE=101000" > /usr/lib/systemd/system/httpd.service.d/limits.conf systemctl daemon-reload systemctl stop httpd systemctl start httpd -- Without this Apache fails when trying to open 1025 files. But I would like to hear from CPanel staff why it happened? 0 -
@vacancy - thanks for posting that. We did revert the change overnight to fix that issue. The specific case that was reverted was EA-9784. 0
Please sign in to leave a comment.
Comments
5 comments