I setup a Nextcloud instance on my Debian 10 server with Apache, following the documentation. Everything works just fine, except for the web interface that takes several seconds to load.
I’ve seen online many tutorials involving FPM, which I understand has something to do with PHP, but it’s not entirely clear to me if I should install it or if it will indeed make the web interface load faster. I can see FPM mentioned in the documentation but I think it never says that you should install it.
Sorry if this is a stupid question but I’m very new to web servers and PHP.
thanks for your answer. I forgot to mention that I’ve already fine-tuned the instance following the directions on the overview page.
Nextcloud is actually performing very well, I just have to wait about 10 seconds when I try to reach the web interface, but once it loads everything is very smooth.
So is the delay when first opening the web page not normal? I don’t think it’s caused by something wrong with my network, as everything else works just fine. For what it’s worth, I’m using a Raspberry Pi 4, but as I already mentioned everything is very smooth once the web page loads.
could be network, could be the system that it is in energy saving mode, or firewall, … You could do some testing, e.g. if you connect via ssh, network delays should also show up, other webpages using a simple php script should pop up php issues, …
Actually I have same issue. It only happens when no one have accessed the web interface in a while (at least many hours, like during a night). If I access using the iphone app the delay to reload a folder is short (2-3 seconds). If I access in a browser it may take 20-30 seconds. Using Firefox developer tools, Network tab, and loading page it says it is waiting for an answer for 25 seconds. Reloading again and the waiting time is less than 1 second.
If I access the web interface on another device it also takes long time if it is the first visit in a while. If I first access the web interface on my computer (taking long time), and then web interface on my phone it goes very fast.
Other php pages running on the server loads instantly. Also, if I am logged out, the login screen and 2FA screen shows up quite fast, but after sending the 2FA code the Files app takes long time to show.
It makes me believe this is caused by some caching and loading of many files on the server. How many users do you have on your servers? On mine it is only me and my family, and only I use the web interface. I mean, if someone is almost always accessing the server it will always have the php pages cached.
I think I am running php-fpm because I have a php-fpm process running, but not 100 % sure. I am running Ubuntu 18 on a quite low-powered AMD E1-2100 dual core @ 1GHz and spinning disks. 2 GB RAM.
I have a total of 3 users on the server. Just like you, desktop and mobile apps do not seem to have this problem, but if no one accessed the web interface for a while, then it takes several seconds before loading. Once loaded, everything is very smooth. Since you have a faster computer then my Raspberry Pi and still have the same problem, I can rule out that the Pi is the cause.