Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by HopelessN00b Jan 13 at 21:36

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. –  HopelessN00b Jan 13 at 21:36

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.

share|improve this answer

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.

share|improve this answer
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 '10 at 11:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.