Page 1 of 1

nginx 500 internal server error

Posted: Thu Aug 04, 2016 10:53 am
by zoto
Error log for nginx (/var/log/nginx/error.log)

Code: Select all

2016/08/04 06:15:59 [alert] 16205#16205: socketpair() failed while spawning "worker process" (24: Too many open files)
2016/08/04 06:15:59 [alert] 16205#16205: socketpair() failed while spawning "worker process" (24: Too many open files)
2016/08/04 06:15:59 [alert] 16205#16205: socketpair() failed while spawning "worker process" (24: Too many open files)
2016/08/04 06:15:59 [alert] 16205#16205: socketpair() failed while spawning "worker process" (24: Too many open files)
2016/08/04 06:15:59 [alert] 16205#16205: socketpair() failed while spawning "cache manager process" (24: Too many open files)
2016/08/04 06:15:59 [alert] 16205#16205: socketpair() failed while spawning "cache loader process" (24: Too many open files)
I have followed this instructions.

http://stackoverflow.com/questions/7325 ... ts-per-min

Somewhere on google I also read about changing soft and hard limit but I don't know if this is the culprit and that how to change it.

The default

ulimit -Sn
1024

ulimit -Hn
4096

I am using CentOS 6.7 x64

Re: nginx 500 internal server error

Posted: Tue Aug 09, 2016 11:25 am
by Elizine
Remove the line where you are assigning a different log file so he uses the standard one at /var/log/nginx/error.log

Also the socket thing is a recommendation and some people can recommend you to use tcp, but still should not be related to your error if you phpinfo.php is working.

Does this Yii requires any kind of cute urls or something similar?

try adding " fastcgiintercepterrors on; " to the php block and check error log.

Re: nginx 500 internal server error

Posted: Fri Sep 08, 2017 2:36 am
by kareem
You can change the soft and hard limits in etc/nginx/nginx.conf

increase the values of
worker_rlimit_nofile xxxxxx;
worker_connections xxxxxx;

Re: nginx 500 internal server error

Posted: Thu Sep 14, 2017 7:00 pm
by noogen
kareem wrote:You can change the soft and hard limits in etc/nginx/nginx.conf

increase the values of
worker_rlimit_nofile xxxxxx;
worker_connections xxxxxx;
I believe the issue is with the system. Should be this one: https://serverfault.com/questions/63721 ... -on-centos