Loading new page hanging under certain conditions

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Hello everyone!

Since a good while I’m facing a very weird issue and need some technical support for troubleshooting.

I really want to get around it and I know it is probably just a minor switch or minor code snippet or line that is the reason for this behavior. I really hope someone out there is able to navigate me throw. What I was able to do and what I thought that might be able I already tested.

Nextcloud version: 26.0.3
Operating system and version: Ubuntu 22.04 LTS (x86_64)
Apache or nginx version: Apache 2.4
PHP version: PHP 8.1.20

At certain conditions my Nextcloud loads new pages (e.g. if you switch from Files to Calendar) very slow (after loading background it hangs for a little bit and then loads everthing else) but all future server requests are fast (e.g. if you navigate throw directories in the files app).

To be more specific, this issue happes whenever access from outside of my private Network (e.g. via mobile network or via Tor network) via an login to a private/incognito browser window or if I’m not already logged / never were logged in (not sure how specific this one is, I’ve just seen both). Even the login page takes recognizable longer to load.

This also happens to mobile clients on Android (can’t test iOS), e.g. Notes App or the Files app whenever you open a file in Nextcloud Text or Nextcloud Office. It takes very long, so all the time the “uh, it needs very long, something might be wrong” shows all the time. Opening a file takes about 20 to 60s and opening a new page takes about 20 to 30s even if every future server interaction is very fast.

I tested with ANY app DISABLED, the issue is still there!
Except the theming app, I can’t try to disable the theming app as this is not possible anymore in the current NC versions. I want to disable this app to test if the “regonice system theme” may be the problem here.

And yes, I’m not sure if the server is hanging or the client page. I assume the server but why it is client depending then?

This issue persists for more then a half year, maybe one year (not sure when it started exactly, it is a while).

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

Steps to replicate it:

  1. Open and login to your common browser window. (You are probably logged in already there.)
  2. Also open and login to a private/incognitor browser window.
  3. Now switch between both windows and navigate throw Files and Calendar. Maybe you’ll will see a difference between the loading time.

Here a system report with config and logs:
Link: DragonCloud
Passwort: UgsomjWBYj

And here all the other logs, like Apache, PHP, Nextcloud:
Link: DragonCloud
Passwort: MfRzxhbduZ

Note:
Today I tested did a lot tests. You will see a lot of stuff there probably. I hope you can find something there. :wink:
Also, yesterday I migrated to a new server with better performance and differenc architecture (arm64 → x86_64). The issue is still there and just more visible.

Later this day I want to try if I can setup a Nextcloud behind a NAT network within my private Network using a VM and try to reproduce that with a fresh installation. But not sure if this is comparable. I will post it here if I got around.

Here a quick video showing the problem and the potential script (last few seconds) that let everything hang:

Thank you already a lot for taking time to read this! :slight_smile:
For any more informations, let me know, I tell you!

1 Like

There are a lot of possibilities as you have a lot of non-default apps deployed. It’s a bit hard to sort out some bits from your logs and since you just changed servers I’m not going to spend too much time on that at the moment.

Please provide details on your proxy config. That matters a great deal when it comes to external access (and TLS/HTTPS access).

Can you take a look at a your browser console - specifically the Network tab - while reproducing these slow conditions? That should help you narrow down which transaction is going slowly.

One issue that stands out that relates to logins:

  • You’ve got an issue with gateway_telegram: two-factor auth provider 'gateway_telegram' failed to load

General performance things that jump out (that admittedly may have nothing do with your described problem):

  • You’re running Office in the Snap which the Snap maintainers specifically do not recommend nor support
  • flow usage (can impact performance - see docs)
2 Likes

Thanks for taking a look into the whole post and the logs! :slight_smile:

I don’t think that an app is the problem as even when disabling every single app (0 apps enabled) the issue still persists. So it can’t be an app, as I already said in the main post.

True, sorting out some bits of my log must be hart. I tested a lot around and on the other side it’s a productive server. :smiley:

Sure, I also tried without Office. I use it on my own risk since the beginning. :wink:

Telegram is disabled as it is not maintaned anymore.
Not sure how to prevent this error. I may need to force enable that app and every user need to disable the gateway-2fa options. :thinking:

Trusted proxies:

  • 127.0.0.1
  • ::1

Content of /etc/hosts

127.0.0.1 localhost
127.0.1.1 dragoncloud.ddnss.de dcloud

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

The route:

  • Port fordwarding via FRITZ!Box 7530: 443, 80, 7867, 3478
  • The ports on the server are the same as on the Internet.
  • No firewall enabled on the server.
  • The Snap uses the ports 443 and 80.
  • SSL certificte via Let’s Encrypt.

The hint with the browser console is good! I will take a look into later this day/tomorrow and post it here.

Looking at the network console tells me that the following script has a very very long execute time when accessing calendar, files or any other app wich wants to transfere 14,48 MB - even on the logout or login page:

https://dragoncloud.ddnss.de/dist/core-common.js?v=e1df6b06-215

On calendar app another script with huge load time is:

https://dragoncloud.ddnss.de/extra-apps/calendar/js/calendar-main.js?v=e1df6b06-215

On tasks app another script with huge load time is:

https://dragoncloud.ddnss.de/extra-apps/tasks/js/tasks-main.js?v=e1df6b06-215

On files app another script with huge load time are some viewer apps and file plugins. But I weren’t able to sort out yet. Need a bit more time tomorrow to investigate in.

  • There is no other entry that has a high excution time and is there on every page.
  • There is not a huge amount of data transfered.

Edit: I added video to the main post showing the problem.

Oh good, another thing I regonized:
Some core js scripts like “core-common.js” should be cached. For my other two cloud instances this does work EVEN in private/incognitor window. :thinking:
So might this be a webserver configuration?

Enabling http compression helped me for Desktop. But on mobile client the core-common.jar seems to still get downloaded each time you open a file in any NC Android app and the used mobile data get increased by 15 MB each time.
See this video: DragonCloud

So i’m still searching for a solution. :thinking:

I’m going to open an issue on th Files for Android repo (see post below for links).

1 Like