Why is my Nextcloud frontend so slow?

I was hoping you could tell from your experience ;-). But maybe thatā€™s a separate thread.

No every installation is different and I certainly havenā€™t tested low end hardware.

I pushed the memory limit to 1024 on my test instance, but the lowest loading time was around 12s.

After i fiddled around a bit with my browser settings i disabled adblock, privacy badger and the firefox integrated tracking protection for that site. After that changes i was down to ~6s.

Afterwards i disabled all apps, and had a load time of 1.5-2s ! Bingo!

Now, slowly enabling back one app after another i was able to identify some apps, that add a few seconds to the loading time:

  • federation: around 1.5s (irregardless of the app loaded)

Interestingly disabling the following apps made the loading slower (???)

  • Accessibility (~1s)

In summary i disabled the following apps, which i donā€™t really use and thus reduced the mean loading time from 12s to 4.5s, which is ok for me:

  • Announcement center
  • Federation
  • First run wizard
  • News
  • Nextcloud announcements
  • Phone Sync
  • Privacy
  • Recommendations
  • Social
  • Update notification
  • Usage survey

Iā€™m leaving the memory_limit at the standard value of 512MB as i donā€™t see a benefit of increasing it.

Thanks a lot for your hints!

2 Likes

Hello, itā€™s me again :slight_smile:

just wanted to add my latest update on this topic (partly posted also here Nextcloud really slow after installation - #6 by besendorf):

Meanwhile, i made a ā€œbare-metalā€ test installation on the same host, where my docker container are running. And the bare-metal nextcloud-instance feels lightning fast - sometimes the load times are below 1s. Iā€™m already thinking about moving back to bare-metal or considering the use of VMā€™s like proxmox. But somehow i still donā€™t want to give up docker, because i really like the concept.

Hi I know this is an old post but I have NextCloud running on a very low-end Synology NAS although it is slow itā€™s not too slow for my purposes, wanted to let you know I sovled some performace issues recently I had LDAP running, I disabled this and itā€™s like night and day, perhaps test this as well

Just my thoughts

1 Like

External S3 access can also make access to Files app very slow when it is set to update every time. In the setting of the s3 integration you can turn that off. It shaved 3-4 seconds off my response time with Files. It is now responding under 1.5 seconds almost consistently (with Redis).

God. I see too much of @Paradox551 typeā€™s that assume weā€™re morons and need 24/7 ā€œsupportā€ from themā€¦ our saviours. :anger:

2 Likes

For me the default use of the build-incode Collabora Online Development Edition turns out to be the reason. Tested the docker-compose on different hardware. Slow like hell. Unuseable.

After changing the Collabora Online settings to Use a Demo Server my system is as quick as a direct installation.

Next is to use a Collabora Online instance in my docker-compose.

2 Likes

Sup? Iā€™m new to here. Iā€™m HyunSoo Tony Lee from south korea.

Yesterday, I have tried the next cloud container on my ubuntu vm.
It was too slow to use it when it was connected via web interface or ip address.
googling doesnā€™t help at all, and I dig into it. here is the solution Iā€™ve found.

  1. additional port has to be open to localhost, and the port number is 9982
    You know the container environment variables! default is that only port 80 is exposed to localhost port. so you have to add one more, 9982 to localhost:9982
  2. disable the app named ā€œbuiltin CODEā€ something.
    login to nextcloud web GUI and click on the circled icon on the top right corner and click ā€˜appā€™ and find the name CODE something, then ā€˜disableā€™ it.

BTW, trusted_domains at the config/config.php is to be modified, so that you can access it remotely.
You may need vi editor, so you have to apt-get update then apt-get install vim first. the IP address or the range at config.php is not the remote clientā€™s ip address or range, it is supposed to be the local ip or ip range where the nextcloud container is running. lookup the interfaces with the command like ifconfig at the container and the container hosting machine.
below is my example. edit it and restart the container.
ā€™trusted_domainsā€™ ==>
array (
ā€˜localhostā€™,
ā€˜172.17.0.ā€™,
ā€˜192.168.0.
ā€™
ā€˜127.0.0.*ā€™,
),

thatā€™s it. it should work as it is supposed to be.

It might help to disable collabora: Nextcloud 20.0.2snap2 Interface Incredibly Slow

(as pointed out earlier by @Marcus_Schurstedt)

when you mount the volume (im assuming you have nginx separate from your nextcloud src)
you must use :z for your nginx container as well as your nextcloud service

    nginx:
        image: nginx:stable
        ports:
        - 9001:80
        volumes:
        - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
        - ./nextcloud:/var/www/html:z

Hi everyone,

just wanted to report back after a while.

Meanwhile i have migrated all of my infrastructure to a proxmox server. That means, that my Nextcloud is running now within a LXC container. And guess what? It runs lightning fast! Now, it is really fun to work with it on a daily base (like checking mails via rainloop).
First i changed my old server (Fujitsu Desktop PC) to run with proxmox. After some time i decided to build an entire new server based on a Ryzen 3 3100 and an ITX Mainboard. The main reason for upgrading my server was to have more RAM (now i have 64GB :blush:).
But as i have now more processing power i also use it for other Tasks like ripping and recoding my BluRay collection.

Cheers

2 Likes

I share your pain ā€¦ :roll_eyes:

Nextcloud and Docker just does not seem to gel. What a shame.

1 Like

I had a similar problem after moving to a containerized (fpm+nginx version in a podman pod with mariadb, redis and collabora) version of Nextcloud and some Google-foo landed me here which wasnā€™t really helping my case at all. Frankly most of the info here is a bit misleading. For example why would you need port 9982 exposed?

Anywho, for those who have long load times and find this thread I strongly suggest checking your loglevel settings in your config.php. If set to 0 youā€™re basically DDoS-ing yourself. Another thing you could check is your Mariadb config. This might help you getting a better performance out of you db: Nextcloud 21 mit Apache2 (http/2) und PHP-FPM (fast track) ā€“ Carsten Rieger IT-Services

6 Likes

@apinter
Thank you - forgot my loglevel at 0 and was wondering why my nextcloud is pretty slow, your hint pointed in the right direction now it works smoothly with nginx :slight_smile:

setted to 1. and now itā€™s fast.

@apinter
I strongly suggest checking your loglevel settings in your config.php . If set to 0 youā€™re basically DDoS-ing yourself.

+1 for this solution, it worked! I set my loglevel to 2 and itā€™s much faster now. Thank you for that! :smiley: :+1:

Hi @mfreudenberg! Thanks for your investigation and solution suggestions. It helped me solve my slow loading problem. In my case disabling External storage support helped a lot! I have some SMB and local (USB drive) devices and now I will to enable it back and debug this problem. Cheers!

Sorry people, I have tried everything I found on this forum:

  1. Setting loglevel to 1, 2
  2. Disabling File access control (it was not even installed on my instance)
  3. Disabling External storage

None of the points above helped. My instance is very slow, not only via the WEB interface, but especially when I access it via Android/iPhone apps.

  1. Nextcloud Talk takes up to 15 seconds to load, and this is what I see every time I launch the app:
    Image: Nextcloud

  2. I sync my notes (I use Joplin Notes) via WebDAV, it takes up to 25 secs to establish connection before it starts syncing notes.

  3. Nextcloud App also takes time to refresh itself.

Interesting part is: it takes a long time to establish connection (even log in), and when it is connected once (Talk, Joplin Notes, etc.), it seems to work just fine and fast enough. As soon as I close apps/connection, it takes a while to reestablish that connection.

CPU usage is 20/30% when I use Nextcloud.

My server is fast enough, and I host a few websites, forum and video streaming on it. Everything else is superfast.

       _,met$$$$$gg.          *******@*******
    ,g$$$$$$$$$$$$$$$P.       ---------------------- 
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 11 (bullseye) x86_64 
 ,$$P'              `$$$.     Host: KVM/QEMU (Standard PC (i440FX + PIIX, 1996) pc-i440fx-5.2) 
',$$P       ,ggs.     `$$b:   Kernel: 5.10.0-13-amd64 
`d$$'     ,$P"'   .    $$$    Uptime: 13 mins 
 $$P      d$'     ,    $$P    Packages: 667 (dpkg) 
 $$:      $$.   -    ,d$$'    Shell: bash 5.1.4 
 $$;      Y$b._   _,d$P'      Terminal: /dev/pts/0 
 Y$$.    `.`"Y$$$$P"'         CPU: AMD EPYC 7282 (4) @ 2.794GHz 
 `$$b      "-.__              GPU: 00:02.0 VMware SVGA II Adapter 
  `Y$$                        Memory: 514MiB / 7956MiB 
   `Y$$.
     `$$b.                                            
       `Y$$b.                                         
          `"Y$b._
              `"""

I had the same error ā€œslow nextcloud frontend in a docker containerā€.

As I learned, Docker uses the iptables rules and caused me a server response time of over 3 seconds (in Chrome open the developer tools > network and for each request the ā€œwaiting for server responseā€ was over 3 seconds).
Depending on the page in the Nextcloud, a request is made several times and then it quickly multiplies into the double-digit second range.

But now to the solution that helped me:
in the ā€œ/etc/systemd/system/multi-user.target.wants/docker.serviceā€ file after the ā€œcontainerd.sockā€ append ā€œā€“iptables=falseā€ to disable the iptables function in Docker, then donā€™t forget ā€œsystemctl daemon-reloadā€ and either restart the docker service ā€œsystemctl restart docker.serviceā€ or reboot the whole server.

Then my response times were like on a bare metal server around 1 second.

I hope this can help one or the other.