Connect () to Unix:/tmp/fcgi.sock failed (11:resource temporarily unavailable) while connecting to upstream, client:66.24 9.65.122, server:tomtop.com, request: "POST
/vynamic/customer/info http/1.1 ", Upstream:" Fastcgi://unix:/tmp/fcgi.sock: ", Host:" Www.tomtop.com ", referrer:" HTTP ://www.tomtop.com/"
If you have a high concurrency business, you must adjust the backlog. For PHP, there are 3 things to be aware of:
1. Operating System | Sysctl
2. Web Front End | For example: Nginx
3. php Backstage | For example: PHP-FPM
The operating system takes CentOS as an example and can be adjusted by default configuration/etc/sysctl.conf file. Like what:
Net.core.somaxconn = 1048576 # defaults to 128
Net.core.netdev_max_backlog = 1048576 # defaults to 1000
Net.ipv4.tcp_max_syn_backlog = 1048576 # defaults to 1024
Effective command:
Sysctl-p
The
Web front-end takes Nginx as an example and can be adjusted by the Listener option in the default configuration/etc/nginx/nginx.conf file. For example,
Listen backlog=8192; # default to 511
PHP background, take php-fpm For example, you can use the default configuration /etc/php-fpm.d/www.conf file for adjustment. For example,
listen.backlog = 8192 # defaults to-1 (determined by System)
under large systems, as at 3, should be adjusted.
Noteworthy are:
PHP-FPM's configuration file, comments about the Listen.backlog option are misleading:
; Set Listen (2) backlog. A value of '-1 ' means unlimited.
; Default value:-1
In fact, if you use default values, it is easy to have problems with backend unreachable, as explained on the old document, which defaults to 200. It is recommended that you do not leave this blank to set an appropriate value.