Nextcloud AIO taking extemely long to start - debugging options?

Hi there,
I’m having the problem that the nextcloud container of the AIO package takes really long to start (about 30 minutes)

I know this problem was already covered here or here.

But this is not the problem of my ISP or the hoster.

A month ago I created a VM for testing purposes, installed Nextcloud AIO and everything is fine! Now I created a second VM in the same network, same OS, same settings (I assume) and this one takes 30 minutes to start the containers!

Is there any way to debug this, to find out what is causing it to be slow? Where timeouts are and such?

I’m already checking docker logs nextcloud-aio-nextcloud -f where every output-line takes about a minute…

Even a simple command like sudo docker exec --user www-data nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="DE" takes about 10-20 seconds to execute (normally its about one second)

I want to find out what the problem is and solve it

Can you share the Compose files used on the working and non-working installation?

What VM platform? Can you confirm it happens in a third test VM?

Okay, after some fiddling and trial and error, I found the issue

I have two independent internet connections for failsave operation. (handled by the router via NATing)

And and the Nextcloud AIO was external reachable through ISP 1 but “dials out” through ISP 2
(The DNS record points to ISP 1)

It looks like NC AIO has some self checks for ingoing and outgoing traffic. And the slow start of the containers was caused by the fact, that the outgoing connection doesnt match the ingoing connection.

Letting every traffic going through one ISP and also setting the DNS to this connection did solve the issue.

Funny thing I also noticed:
At the moments when the DNS record still was not propagated and the NC AIO didnt know the IP address behind the DNS name, the containers did start fast. But right at this moment the DNS record was present, the containers became slow again.

For future opteration it would be nice to be able to disable those particular checks. Or at least let the logs tell you whats wrong. Here was NOTHING telling me about what was wrong. It was just slow, there were no error or info messages.

Edit:
Opened an issue on GitHub now