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

Random 502 Error

Open KatiaSishost opened this issue 6 months ago • 5 comments

Hi, I have a domain with Cloudflare proxy... a Proxmox with LXC where NPM is... and another LXC with another Docker with a website in Nextjs... My website works correctly, but randomly gives a 502 error. I have to wait a few seconds and try again and it happens... again... I already enabled the asset cache and disabled it... I also deleted other domains... but it keeps doing the same thing...

KatiaSishost avatar Aug 01 '25 09:08 KatiaSishost

My setup is not the same but i'm facing the same problem. following

inside ngnix i get a lot of 502

Image

vascozorrinho avatar Aug 01 '25 16:08 vascozorrinho

i'm getting the same here! Random 502 failures. i monitor my sites now per minute and saw that some sites were getting this 502 while others worked fine.

Right now i tried to refresh the mac addresses of the containers, if that wont work i'll try to remove and recreate whole containers

danielgroen avatar Aug 13 '25 19:08 danielgroen

I solve the problem... 2 LXC have the same MAC Address!

I chance it and solved.

KatiaSishost avatar Aug 13 '25 20:08 KatiaSishost

I've read somewhere that special characters in the password could cause problems. Tried another installation without those special characters and it seems fine for now.

vascozorrinho avatar Aug 14 '25 11:08 vascozorrinho

Observing the same problem: random 502s, no pattern, just random 502s for the same proxy host

2 LXC have the same MAC Address!

This comment made me check and sure enough, two docker containers (I use portainer) had the same MAC address within their network, one of which was the container with random 502s. After fixing the collision, the random 502s seem to be gone.

To make this easier to find when scrolling through issues:

IF YOU USE DOCKER, CHECK THAT ALL MAC ADDRESSES OF CONTAINERS ARE UNIQUE AND THERE IS NO COLLISION

IgnatBeresnev avatar Nov 27 '25 22:11 IgnatBeresnev