You can also set ulimit using worker_rlimit_nofile in nginx.conf