# Nextcloud AIO taking extemely long to start - debugging options?

**URL:** <https://help.nextcloud.com/t/nextcloud-aio-taking-extemely-long-to-start-debugging-options/185956>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** docker, aio\
**Created:** [March 20, 2024, 2:21pm UTC](https://help.nextcloud.com/t/nextcloud-aio-taking-extemely-long-to-start-debugging-options/185956 "2024-03-20T14:21:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrakeHamString](https://help.nextcloud.com/letter_avatar/drakehamstring/32/6_22734026db12803ebb3e059622ac3534.png) [@DrakeHamString](https://help.nextcloud.com/u/DrakeHamString)\
**Post date:** [March 20, 2024, 2:21pm UTC](https://help.nextcloud.com/t/nextcloud-aio-taking-extemely-long-to-start-debugging-options/185956/1 "2024-03-20T14:21:01Z")

</div>

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](https://github.com/nextcloud/all-in-one/discussions/1600) or [here](https://help.nextcloud.com/t/container-nextcloud-aio-nextcloud-starts-extremely-slow/170765).

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

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_22734026db12803ebb3e059622ac3534.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [March 22, 2024, 5:48pm UTC](https://help.nextcloud.com/t/nextcloud-aio-taking-extemely-long-to-start-debugging-options/185956/2 "2024-03-22T17:48:04Z")

</div>

> [@DrakeHamString](#):
>
> same settings (I assume)

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?

---

<div class="post-metadata">

**Author:** ![DrakeHamString](https://help.nextcloud.com/letter_avatar/drakehamstring/32/6_22734026db12803ebb3e059622ac3534.png) [@DrakeHamString](https://help.nextcloud.com/u/DrakeHamString)\
**Post date:** [April 9, 2024, 9:02am UTC](https://help.nextcloud.com/t/nextcloud-aio-taking-extemely-long-to-start-debugging-options/185956/3 "2024-04-09T09:02:51Z")

</div>

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

> <https://github.com/nextcloud/all-in-one/issues/4518>
>
> \<!---
> \- If you use Cloudflare Tunnel or Cloudflare Proxy, see https://github.co…m/nextcloud/all-in-one#notes-on-cloudflare-proxytunnel for known issues/limitations and workarounds.
> \- For issues with Collabora or Talk, make sure to follow https://github.com/nextcloud/all-in-one/discussions/1358. It may already resolve your issue and makes it easier to help you.
> \---\>
> 
> 
> \### Steps to reproduce
> 1. Having two Internet Connections (ISPs) for failsave operation, managed by a router (who does NATing)
> 2. DNS record points to IPS 1, outgoing traffic goes trough IPS 2
> 3. Setting up AIO
> 
> \### Expected behavior 
> 
> Normal AIO Operation, fast start of containers.
> Snappy operation.
> 
> \### Actual behavior 
> 
> Starting of ''nextcloud-aio-nextcloud'' takes about 30 minutes.
> The normal setup works fine, the slow start appears when doing the "normal" start of the container after setup is done.
> When the container is started, the web interface is very slow and laggy. There are minutes of wait time until the website loads.
> But its reachable.
> 
> \### Host OS 
> 
> Linux
> 
> \#### Nextcloud AIO version 
> 
> v7.13.1 (current behaviour expected in latest vesion too)
> 
> \#### Current channel 
> 
> latest
> 
> \#### Other valuable info 
> 
> It seems that there are internal checks or timeouts which are causing the slow start. Where it checks if ingoing and outgoing traffic ways are matching.
> It would be nice to be able to disable those checks or at least let the logs tell you whats wrong. Here was nothing telling me about any issue. It was just slow, there were no error or info messages.
> 
> I already posted this in the forum before opening the issue on GitHub:
> https://help.nextcloud.com/t/nextcloud-aio-taking-extemely-long-to-start-debugging-options/185956
> 
> After setting all traffic through one ISP did solve the issue for me. But the problem still remains when there is an actual need to run it though two ISPs.
> 
> I also switched the IPS's roles to reproduce the issue the other way arround - yes, the issue was there again.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:35am UTC](https://help.nextcloud.com/t/nextcloud-aio-taking-extemely-long-to-start-debugging-options/185956/4 "2025-01-16T08:35:54Z")

</div>


