I want to change the open files setting for Apache on a cPanel server. If I set the new value in /etc/init.d/httpd everything works fine, until I recompile with EasyApache, then it gets reset back to the old value (which is no higher than 16384 and I need higher). Where can I up the default value?

I cannot find it anywhere.


2 Answers 2


I myself came up with:

attr +i /etc/init.d/httpd

That worked, but nicer is the answer cPanel gave finally:

I couldn't find that in Google at all, but there you go, hopefully now people can find it.


I'll hazard a guess here. Probably when you are recompiling, your init.d/httpd is getting overwritten. When you recompile, all your processes are getting killed off, so the ulimit no longer applies to them. Ulimit only applies to the shell it is running in. So one solution to this would be to set the default value for the entire shell to be higher. You could do this by just going in to /etc/profile and setting it there. Just be aware that this will have system wide consequences. The other thing you could do would be to write a shell script that just appended the ulimit to your init.d/httpd file if it wasn't there, and have it run as part of the compile process.

  • Hi, thanks for the guess, but that's not it. This is very cPanel specific and what you are saying is a general case. The compile does overwrite the httpd script but I do not know where it gets the new httpd script from or how to interfere with the compilation process. I need to do that to prevent it from changing the values.
    – user45339
    Jul 22, 2010 at 11:56

Not the answer you're looking for? Browse other questions tagged .