1

我搜索了有关 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"

我将 Golang 与 Nginx 一起使用。请帮忙

更新

按照 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"
4

0 回答 0