我搜索了关于stackoverflow和谷歌搜索的不同问题,但仍然无法解决问题。
我的结构流是xx.domain.com,它指向服务器ip地址11.11.xx.xx。我已经为子域设置了SSL,以监听端口8443。这是nginx conf。
server {
listen 8443 ssl default_server;
listen [::]:8443 ssl default_server;
server_name xx.domain.com;
ssl_certificate /etc/letsencrypt/live/xx.domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xx.domain.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#try_files $uri $uri/ =404;
#try_files $uri $uri/ /index.html;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://127.0.0.1:8443;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}}
这是错误日志
*763 768 worker_connections are not enough while connecting to upstream, client: 127.0.0.1, server: xx.domain.com, request: "GET / HTTP/1.1", upstream: "https://127.0.0.1:8443/", host: "xx.domain.com"
我在Nginx上使用Golang。请帮助
更新
在Voraprung在注释中建议将“ worker_connection”增加到2048后,仍然出现500错误,并带有以下错误日志。
*2022 socket() failed (24: Too many open files) while connecting to upstream, client: 127.0.0.1, server: xx.domain.com, request: "GET / HTTP/1.1", upstream: "https://127.0.0.1:8443/", host: "xx.domain.com"