High Load on Postgres Database

My NC is hosted on a dedicated virtual server. I have no sudo permissions on the server. Now the hosting provider told me the Postgres database of my NC causes high load on the database.

How can I find what causes this issue and how to solve it?

A high database load is very often being caused by using the database for all file locking activities. If you install and use e.g. Redis for the file locking the database load should go done.

I think NC does not lock the files in my NC, because I use in the web interface the filebrowser of NC. So, where can I see what the database currently is doing? In the administrator section of my NC web interface I can see in the system panel a workload of appr. 4.33-6.97 within the last minute. What does this number stands for?

That’s a strange logic. It doesn’t matter if you use the web interface or not, Nextcloud always uses a file locking to prevent any problems if files are being accessed. Check your Nextcloud configuration file if and how file locking has been configured.

Probably I misunderstood you. Do we talk about server side encryption? I’ve heard, there would be not file access via web interface when server side encryption is enabled.

Where will I find the respective information?

That’s easy, you only have to follow the link in my primary posting to jump directly to the Nextcloud administrator guide :wink:

I will follow this instruction:

But I dont know how to connect directly to my database. I know the name of the database. But I do not know how to connnect directly to it.

Could you please give me some advice?

Unfortunately you didn’t provide the usual information about your environment, used software versions, configuration, log file excerpts, etc., etc. Therefore I cannot tell you how you can connect to your database, because this information can be found in the Nextcloud configuration file.

Beside this you find information about how to connect to a PostgreSQL database on the internet:

https://www.google.com/search?client=firefox-b-d&q=postgresql+connect+to+database

I’ve found what has caused the problem and the solution too. It was the LOCKED 423 failure. And
DELETE FROM oc_file_locks WHERE 1
has it fixed.

1 Like