I have open files limit configured in /etc/security/limits.conf
* hard nofile 500000
* soft nofile 500000
root hard nofile 500000
root soft nofile 500000
When I start a process from shell, it works fine.
But there is one process that starts when the server boots.
# update-rc.d myprocess defaults 99
# cat /proc/1435/limits
Limit Soft Limit Hard Limit Units
....
Max open files 4096 4096 files
....
Why this is happening?