How to check the open file limits

check currently limit

ulimit -n

Check hard limit

ulimit -Hn

Check soft limit

ulimit -Sn

Update it for the current shell:

ulimit -c unlimited

or

ulimit -c 1048576

Update it permenently:

vi /etc/security/limits.conf # or /etc/limits.conf

Add the following line

*                soft    nofile         unlimited

How to enable core dumps