每次当我尝试发布我的网站,我得到几分钟后502错误的网关错误,并在我的default-error.log文件我得到这个错误反复(文件大小为360MB ..):
2016/02/03 14:57:28 [error] 1044#1044: *7248 connect() to unix:/var/run/php/php7.0-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 123.456.78.90, server: default, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "domain.com"
服务器configuration
nginx.conf :
server { listen 80 default_server; server_name default; root /home/forge/default/public; # FORGE SSL (DO NOT REMOVE!) include logjam_fix; # ssl_certificate; # ssl_certificate_key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; index index.html index.htm index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } access_log on; error_log /var/log/nginx/default-error.log error; error_page 404 /index.php; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } }
有什么数据我失踪?
尝试增加打开文件的最大数量:
root@server $ sysctl fs.file-max=3000000000
编辑:
您通常可以通过将该行添加到/etc/sysctl.conf来使这些更改永久/etc/sysctl.conf :
fs.file-max=3000000000