Running two nextclouds on Unraid - > occasional 502 error

Hi guys,

I have the following unraid docker running:

  • NginxProxyManager autostart wait 0
  • mariadb autostart wait 5
  • mariadb2 autostart wait 20
  • nextcloud autostart wait 20
  • nextcloud2 autostart wait 20

All on bridged network.
Each nextcloud is directed to via its port from Nginx.
Each nextcloud is linked to mariaDB via separate port.

Most of the time all is running fine, but from time to time I encounter the

502 bad gateway on the NEXTCLOUD2.

Maybe once a day…

Steps to replicate it:

  1. I assumed that it was a problem of dockers starting too fast.
  2. I tried to have a wait time before they start. But problem appears again.
  3. When I stop mariaDB2 and and NEXTCLOUD2 and restart it after few seconds, it works again.

Could anyone suggest where to look for problems?



Is this the first time you’ve seen this error? (Y/N): NO

Nextcloud version: Nextcloud 22.1.1
Operating system and version : UNRAID Version: 6.9.2
Nginx version: v2.9.8 © 2021

The output of your Nextcloud log in Admin > Logging:
This is the only error warning I get since it has worked:

Warning	core Login failed: '67.513466269904' (Remote IP: '184.XXX.242.192')	

Am I correct to assume that the error should be between Nginx and nextcloud communication ?