Nextcloud take very long time to respond
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
@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_bufferssetting 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.
There's also some cryptic math here - https://www.oreilly.com/library/view/postgresql-10-high/9781788474481/cfcdb792-38e6-42c9-b60b-3c0a86007aa4.xhtml