Nginx 502 Bad Gateway

4 months ago
Yes I have , and many many more.
in past few days of searching the net , I see 502 bad gateway is common when installing dont apps with reverse proxy , it could happen for many reasons, however, I have 2 identical nopcommerce installed . One on local computer for testing, now On OVH vps that behaves exactly the same .

my host , has ran tests on my VPS , they assured me VPS has no Issue.
Nopcommerce installation with nginx , comes directly from Microsoft dotnet site. so , i see no issues with configuration .. site work. admin work. restart application that bombs ..
on two system with Nopc , if 502 error , would have happened for different reasons, then one can conclude is configuration issue.
there is issue with nopcommerce ..as i have found bugs that has been reported before that was not corrected for past 10 months ..
4 months ago
I found this . since issue is same as what im having.
https://stackoverflow.com/questions/69859771/502-bad-gateway-running-asp-net-core-5-site-on-nginx-on-ubuntu-20-04

but this solution require core code modification .. any suggestion ?
4 months ago
Issue seems to be delay in upstream server Nop.Web starting on linux .. takes about 10 seconds. and at the same time Nginx tries connecting to upstream . since upstream is in restart , I get 502 gateway message , this dose not mean there is issue either with NopCommerce or Proxy , is just Nginx has no configuration to wait set seconds before reconnecting. I read Nginx Plus can do that , so I have contacted Nginx ..Mean time will look at Apache for this option.

will keep posted
3 days ago
Hi, Have you got a solution to this? I'm facing the same problem.

I have enabled the Redis cache + configured Loadbalancer.    App works fine, but when I save anything from the admin side or click on clear cache, it returns me with 502 - https://prnt.sc/b0aiMI_41pzq

I think it fails to remove the cache key from Redis, may it fails to establish a connection to the Redis server while removing the cache?

But at the same time, it creates a cache. So Setcache is working..