Nextcloud take very long time to respond
-
Hi
Suddenly nextcloud takes a very long time to open the home page and clients are timing out. From what I observed in the services section, PostgreSQL is almost running with 100% usage. Also, logs show the error message. Find below screenshot for reference. I do appreciate any recommendation to solve this issue
Best regards
-
@chaitanya since you also contacted support, I was able to look at the server directly and so far I am not sure what that postgres error about disk space is, the server has enough tmpfs or actual disk space available. I am still investigating what the root case might be.
-
There seem to be two issues here:
- One some db inconsistency which is causing duplicate errors. This has the same errors as https://forum.cloudron.io/topic/4212/how-to-fix-thes-errors-in-postgresql-logs-related-to-oc_filecache_extended
- Another is "ERROR: could not resize shared memory segment "/PostgreSQL.1655854505" to 4194304 bytes: No space left on device".
Investigating the latter. There is a
shared_buffers
setting in postgresql config which is currently at 64MB. Then docker has a default --shm-size of 64MB as well (https://github.com/moby/moby/issues/29492). The default is in fact 128MB per https://www.postgresql.org/docs/12/runtime-config-resource.html these days. I will fix our container and docker configuration.More info:
-
There's also some cryptic math here - https://www.oreilly.com/library/view/postgresql-10-high/9781788474481/cfcdb792-38e6-42c9-b60b-3c0a86007aa4.xhtml
-
I have made a fix here - https://git.cloudron.io/cloudron/box/-/commit/949b2e2530283e1690656c2dd417e00a78b3251d . I am still monitoring @chaitanya's server to see the impact the change has.