For those accounts which does not have a valid shell, those with nologin for instance, it’s sometimes difficult checking which ulimit applies to that account. We have however an easy way to check and confirm it with the following command.
# su - apache -c 'ulimit -aHS' -s '/bin/bash'