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.
working with a service provider's management interface, such as cPanel
.