limits.conf not being applied.
Solution 1:
For services in init.d you cannot use /etc/security/limits.d inittab is not reading that files and it is based on pam.d which is not used in initialization startup scripts. All init startup scripts source /etc/init.d/functions so for all services you could hack that script and set limits there. I used to hack /etc/sysconfig for particular services when I needed {httpd, some brokenass oracle stuf} e.t.c. Hope this helps.
Solution 2:
Ubuntu 14.04
Had to add both 'hard' and 'soft' entries in /etc/security/limits.conf for pam to recognize settings for rtprio (-r) and memlock (-l).