Bad gateway (error code 502)
Seems like I'm getting everyone's favorite error. I'm using Nginx Proxy Manager to host
immich_proxy
outside my network.
Here's the most recent error logged on NPM:
Not too sure what to do here. I've tried restarting the stack, but that didn't seem to work. My .env
file is standard, with no changes to alternative service addresses.16 Replies
I also started getting the same error after upgrading. I haven't had a chance to debug properly yet. I see 404 errors in the reverse proxy but haven't checked the endpoints
Clearing cookies and any website data for the domain temporarily resolves the problem, up until you close the tab and re-visit the website. Issue promptly occurs when reaching the leading slash
/photos
of the base domain (https://immich.server.io/photos)Have you set the client_max_body_size for your setup?
Can you post, describe your setup so we can help with troubleshooting?
I have not set the
client_max_body_size
on NPM, however, just doing so does not make a difference. Hopefully I'm not misplacing that.
My setup is with the default docker-compose.yml
and example.env
file. Everything is genuinely untouched.
Visiting the web/proxy container through my local IP works just fine and presents no issues, but as soon as I go through a proxy, I encounter error 502.same error for me
clearing cookies does work
All working here. Just opened in private window and then everything worked
Having the same issue here.
Deleting cookies is working fine but when you refresh, open another window etc. I get a 502.
Fixed it by changing the buffer sizes. Saw there was a difference with the used one and the immich nginx container
This is pretty strange error as we didn’t really change anything regarding proxy in this release
GitHub
[BUG] 502 Bad Gateway after restarting the Browser (Firefox, Gnome ...
The bug Since upgrading to 1.47.2 from 1.46.0 I get a 502 Bad Gateway when I try to open Immich. Deleting Cockies and Website data solves the issue until it appears again. The OS that Immich Server...
This seems to fix this issue
Did you guys uodate your proxy recently? And which method did you use to run Immich? (Docker-compose, single Docker file…etc) I am trying to find the root cause of the update
Docker-compose
i update proxy with watchtower
no specific change in config
Didn't change a thing. This morning I updated the portainer stack by hand.
Found the 502 error and started looking for an error.
Found the same "2023/02/14 12:27:45 [error] 2822440#2822440: *9613752 upstream sent too big header while reading response header from upstream, ..." error as the BUG report.
I fixed it the with the same proxy settings as in 1753.
Thanks for the report - looks like it is an issue with the web framework we are using related to prerendering.
Thanks for all your help guys! That did it for me. Increase the
proxy_buffer_size
in your Nginx config for the time being:
Cheers 🎉has anywhere here set up Caddy as a reverse proxy? I am getting a 502 error as well now using Caddy as a reverse proxy. I did play around with the buffer size settings to increase the size but no dice.
I am getting a timeout error in the Caddy logs, nothing showing up in the logs for immich_web.
Is it running in the same network as immich? Then you should use port 8080.