Nextcloud 27.1.3 behind Nginx Proxy Manager suddenly 502 Bad Gateway

Hi,
I have installed my Nextcloud with the turnkey Linux image on a ESXi VM

All fine. Then I redirected my IONOS subdomain to myfritz URL to the fritz box.
Then with Nginx Proxy Manager to the IP of The VM with Nextcloud.

OK ?

Everything working smooth!

Sometimes I faced this 502 Bad Gateway when I tried to call the URL on iPhone or tried to log in with deck app on iPhone.
Then i used the app key and since then it went OK.
Before I was able to go back to the snapshot I took after some changes in the cloud, and it was ok again.

BUT today a lot of work was done in the cloud an i faced this 502 Bad Gateway again.

I can reach my Nextcloud with Local IP without problems.
I did an update to 27.1.3 which worked ok but still 502 Bad Gateway.

I removed the certificate in Nginx Proxy Manager and wanted to get a new one but with no success.

I checked in CMD with nslookup if the subdomain arrives at the fritz box also OK
Port forwarding to Nginx Proxy Manager is ok because other VMs are reachable via other domains.

Now, not to lose all the work, it’s time to solve this behavior!

Hope for experience her to get this solved.
Many THX!

PS: If you need more info to be able to help, Pls. let me know.

Do you have a logfile of that nginx proxy? It might give a bit more details of the bad gateway. If the nginx proxy is creating this error or some different place in the chain (check logs of weblogs of webserver in vm as well)…

Could be that somewhere the number of connections are limited, or something else is saturated.

The large changes and sync is mostly done from within the network where you don’t have issues? Locally, you access directly the VM without an additional proxy?

Many THX for taking care to finally solve this ongoing problem !

I have set up the Nginx Proxy Manager in a separate VM based on Alpine with a script I think from Reddit
on Reddit, I found this:

They’re in */data/logs/ directory of NGINX Proxy Manager. The logs containing IPs connecting to the proxy are named e.g. “proxy-host-1_access.log”. The number is your proxy’s number.

Is this correct?

They are very big!
Can I delete them without getting problems to see what is actually happening when trying to reach the cloud with domain?

Your other points:

  • Could be that somewhere the number of connections are limited, or something else is saturated.
    – I don’t know — where to look?

  • The large changes and sync is mostly done from within the network where you don’t have issues? Locally, you access directly the VM without an additional proxy?
    – The large changes were done logged in with domain.
    I always use the cloud also locally with domain.
    (when it works :upside_down_face:)

What I have noticed:
When I go back to an old snapshot — cloud is reachable via domain.
So can we say the issue is not The Nginx Proxy Manager?

I think the next steps could be:
1 Delete all logs.
2 go to snapshot with working Domain login.
3 go to snapshot with non-working Domain login.
4 See the new log files.

What do you think?