nginx+springboot,每运行一段时间都会出现A error occurred错误?

微信后台是nginx+springboot,发布运行没问题,但每运行一段时间都会出现A error occurred错误,如果重启服务器又能正常运行。

img

观察猜测是用户大量访问的时间段会出现这个问题。我猜是nginx配置问题。网上搜索大量信息无果,没找到有效解决方法。这个是一个煤气微信收费程序。服务器配置如下,且硬盘空间足够。

img

nginx的错误日志如下:

2022/05/21 21:22:35 [error] 1792#1876: *67178 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 113.231.103.146, server: tmmcq.tfcoal.com, request: "GET /public/wxweb/autback?code=051T6oFa1Q22dD08ROFa1UYMzA3T6oFG&state=http%3A%2F%2Ftmmcq.tfcoal.com%2Findex.html HTTP/1.1", upstream: "http://127.0.0.1:81/public/wxweb/autback?code=051T6oFa1Q22dD08ROFa1UYMzA3T6oFG&state=http%3A%2F%2Ftmmcq.tfcoal.com%2Findex.html", host: "tmmcq.tfcoal.com"

2022/05/21 21:22:36 [error] 1792#1876: *67188 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 175.24.214.150, server: tmmcq.tfcoal.com, request: "POST /public/wxweb/receivemsg?signature=4270528b64b778277118d37d8a726c7b75c25d97&timestamp=1653139331&nonce=409298341&openid=o6U2vuNAQwSrPNieKcqk7Bd6fHn8 HTTP/1.1", upstream: "http://127.0.0.1:81/public/wxweb/receivemsg?signature=4270528b64b778277118d37d8a726c7b75c25d97&timestamp=1653139331&nonce=409298341&openid=o6U2vuNAQwSrPNieKcqk7Bd6fHn8", host: "tmmcq.tfcoal.com"

请求解答,谢谢
配置文件信息我在下方回复里贴出来了,麻烦您给看看。

肯定是配置,需要把配置粘出来,不然只能盲猜

#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

#gzip  on;

server {
    listen       80;
    server_name  tmmcq.tfcoal.com mcqgs.tfcoal.com;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        proxy_pass http://127.0.0.1:81/;
        proxy_set_header Host $http_host;
        proxy_set_header  X-Real-IP  $remote_addr;  
        proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
        root   html;
        index  index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}

# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#    listen       8000;
#    listen       somename:8080;
#    server_name  somename  alias  another.alias;

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}


# HTTPS server
#
#server {
#    listen       443 ssl;
#    server_name  localhost;

#    ssl_certificate      cert.pem;
#    ssl_certificate_key  cert.key;

#    ssl_session_cache    shared:SSL:1m;
#    ssl_session_timeout  5m;

#    ssl_ciphers  HIGH:!aNULL:!MD5;
#    ssl_prefer_server_ciphers  on;

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}

}