nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Error 503 - Service temporarily unavailable

Open a1hoxha opened this issue 1 year ago • 8 comments

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug I have configured NPM in the correct way when it comes to port & traffic forwarding. When I use a domain with no traffic, it works well with no issue. When I use a domain with a lot of traffic on it (700-800 clients simultaneously), I get Error 503. I am using the same domain directly without passing to the proxy, and it is working perfectly fine. When I use Proxy and I keep refreshing the website, 1/4 of times works, 3/4 of times gives error 503. I use this to hide the IP of the streaming server.

""I have checked the logs and I am getting:

183#183: *127384 connect() failed (111: Connection r efused) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:8080, upstream: "xx.xx.xxx.xx:8080", bytes from/to client:0/0, bytes from/to upstre am:0/0""

Is there any way I can increase the load that it can handle? I want to set it to have no limits on traffic handling. Is there any way to do so?

Nginx Proxy Manager Version

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Operating System

Additional context

a1hoxha avatar Nov 13 '24 11:11 a1hoxha

+1

mynxg avatar Nov 13 '24 16:11 mynxg

image

mynxg avatar Nov 13 '24 16:11 mynxg

image

2024/11/13 16:49:28 [error] 173#173: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 222..., server: nginxproxymanager, request: "POST /api/tokens HTTP/1.1", upstream: "http://127.0.0.1:3000/tokens", host: "117...:8888", referrer: "http://117...**:8888/login"

mynxg avatar Nov 13 '24 16:11 mynxg

image

2024/11/13 16:49:28 [error] 173#173: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 222..., server: nginxproxymanager, request: "POST /api/tokens HTTP/1.1", upstream: "http://127.0.0.1:3000/tokens", host: "117...:8888", referrer: "http://117...**:8888/login"

View the logs of Docker containers. [11/13/2024] [4:48:53 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite [11/13/2024] [4:48:53 PM] [Global ] › ℹ info Creating a new JWT key pair... [11/13/2024] [4:48:57 PM] [Global ] › ℹ info Wrote JWT key pair to config file: /data/keys.json [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info Current database version: none [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] auth Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] user Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] user_permission Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] proxy_host Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] redirection_host Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] dead_host Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] stream Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] access_list Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] certificate Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] access_list_auth Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [initial-schema] audit_log Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [websockets] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [websockets] proxy_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [forward_host] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [forward_host] proxy_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [http2_support] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [http2_support] proxy_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [http2_support] redirection_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [http2_support] dead_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [forward_scheme] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [forward_scheme] proxy_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [disabled] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [disabled] proxy_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [disabled] redirection_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [disabled] dead_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [disabled] stream Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [custom_locations] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [custom_locations] proxy_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [hsts] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [hsts] proxy_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [hsts] redirection_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [hsts] dead_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [settings] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [settings] setting Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [access_list_client] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [access_list_client] access_list_client Table created [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [access_list_client] access_list Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [access_list_client_fix] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [access_list_client_fix] access_list Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [pass_auth] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [pass_auth] access_list Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [redirection_scheme] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [redirection_scheme] redirection_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [redirection_status_code] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [redirection_status_code] redirection_host Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [stream_domain] Migrating Up... [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [stream_domain] stream Table altered [11/13/2024] [4:48:58 PM] [Migrate ] › ℹ info [stream_domain] Migrating Up... [11/13/2024] [4:48:58 PM] [Setup ] › ℹ info Creating a new user: [email protected] with password: changeme [11/13/2024] [4:48:59 PM] [Setup ] › ℹ info Initial admin setup completed [11/13/2024] [4:48:59 PM] [Setup ] › ℹ info Default settings added [11/13/2024] [4:48:59 PM] [Setup ] › ℹ info Logrotate Timer initialized [11/13/2024] [4:48:59 PM] [Global ] › ⬤ debug CMD: logrotate /etc/logrotate.d/nginx-proxy-manager [11/13/2024] [4:48:59 PM] [Setup ] › ℹ info Logrotate completed. [11/13/2024] [4:48:59 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services... [11/13/2024] [4:48:59 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json

An error is reported when it reaches this point.

mynxg avatar Nov 13 '24 16:11 mynxg

image Checked the reason: Part of it is an issue with the IP range. It's more appropriate to change it to the way of using environment variables.

mynxg avatar Nov 14 '24 09:11 mynxg

The bug has been reproduced. The reason is that the mapping path in Docker is too long. It can be fixed by shortening the path a bit.

It has been resolved.

#start:docker compose -f docker-compose-nginx-proxy-manager.yml up -d
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80' 
      - '81:81'  
      - '443:443' 
    volumes:
      - "/root/docker-data/npm/data:/data"
      - "/root/docker-data/npm/letsencrypt:/etc/letsencrypt"

mynxg avatar Nov 14 '24 10:11 mynxg

该 bug 已复现,原因是 Docker 中的映射路径过长,可以通过稍微缩短路径来解决。

已解决。

#start:docker compose -f docker-compose-nginx-proxy-manager.yml up -d
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80' 
      - '81:81'  
      - '443:443' 
    volumes:
      - "/root/docker-data/npm/data:/data"
      - "/root/docker-data/npm/letsencrypt:/etc/letsencrypt"

good,It's a problem with the mapping path being too long. If it's too short, it'll be fine immediately. Don't worry about any other databases or anything else

WangGuan11 avatar May 19 '25 10:05 WangGuan11

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Nov 19 '25 02:11 github-actions[bot]