I’m recently installed Nextcloud in a AWS EC2 instance for my company. We are thinking about moving all of our files to this great application.
So far we have been testing it for a month and it has been working very nicely, but just last week we started getting performance issues. Login into the Nextcloud was very slow, and opening files or switching between applications was also extremely slow.
I notice that my CPU load in the admin “monitoring” tab was averaging 1.2 constantly, which was quite high for how we where using nextcloud. So what i did was to reboot Apache, by doing this Nextcloud returned to its usual performance, and the CPU load indicator displayed an average of 0.02 indicating that the web server was the component generating so much work on my server.
The thing is that i don’t know why the apache web server was generating so much cpu load.
Has someone experienced a similar issue? Does someone know why this is happening?
Is Nextcloud used by many users when you have this CPU load? Is it one apache process at 100% or several ones? Anything in your logfiles?
Do you use caching modules (redis, apcu)? Real database or just sqlite? For the real database, did you do some cache optimizations, if not it can be very slow, however the load should be on the database.
It is hard to tell what is wrong here. @pgollor has a lot of apache processes running for only three users. I’d try to reducce them a bit. Also it is strange that these apache processes run for a very long time, are you using system cronjobs (if not cronjobs are run by apache as well and increase the load). If possible use apcu and redis caches. When processes run too long, and logfiles don’t give any hint, you could suppose it is the sql-database. Enable slow-queries logging to get an idea.
Looks like the problem with the calendar app does not cause my high CPU usage.
The workaround posted in the link above does not help. I have the same problem again.
Apache server status shows about 150 processes coming from external heading for /status.php.
Most of them from the same v6 ip. I use calendar sync, desktop sync client and some tests with talk.
If possible, try to find the client with so many open connections (especially if it is your own). Can you disable certain services temporarily, so you can find out which clients creates so many connections? Also check on your browser if status.php returns a result immediately or if it takes a while.