Nexcloud AIO - Database configuration: A significant share of page reads are missing the shared buffer cache.

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 35.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • OpenMediaVault 8.5.10-1 (Debian 13)
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.68
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • caddy 2.11.4
  • PHP version (e.g, 8.3):
    • 8.4.25
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • I do not remember, but i would say around june/july
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO (v14.2.0)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Using a CF Domain, not CF tunnel, everything behind caddy

Summary of the issue you are facing:

After a few updates in the AiO UI, as usual Nextcloud would sometimes not update properly and I have to do manual maintenance, this is unrelated to the issue but it caused me to check the Overview tab in the Administration settings, which got me a few issues to fix, which I did, except for the Database Configuration. When I click on “Show the findings”, I get the following:

The snippet contains the following:

# postgresql.conf
shared_buffers = 256MB

Asking me to add it to the file mentioned above.
Since I’m using the AIO setup, I checked inside nextcloud-aio-database under /var/lib/postgresql/data/postgresql.conf which had shared_buffers set to 256MB. I’m a bit confused by this error, and also trying to edit that file will just reset it back to its original value of 256.

Steps to replicate it (hint: details matter!):

  1. -

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

No logs during the time of the problem

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 3,
            "read_timeout": 10
        },
        "overwritehost": "next.domain.win",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "next.domain.win"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "35.0.1.1",
        "overwrite.cli.url": "https:\/\/next.domain.win\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatechecker": true,
        "updatedirectory": "\/nc-updater",
        "loglevel": 2,
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "config_preset": 2,
        "log_type_audit": "file",
        "logfile_audit": "\/var\/www\/html\/data\/audit.log",
        "update_channel": "stable",
        "serverid": 445,
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": true,
        "mail_smtpport": "587",
        "mail_sendmailmode": "smtp",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": false,
                "verify_peer": true,
                "verify_peer_name": true
            }
        },
        "DOMAIN": "next.domain.win",
        "AIO_VERSION": "v14.2.0"
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 8.0.0
  - admin_audit: 2.0.0-dev.0
  - appstore: 2.0.0-dev.0
  - bruteforcesettings: 8.0.0
  - calendar: 6.6.2
  - checksum: 2.1.2
  - circles: 35.0.0
  - cloud_federation_api: 2.0.0-dev.0
  - comments: 2.0.0-dev.0
  - contacts: 8.9.1
  - contactsinteraction: 2.0.0-dev.0
  - dashboard: 8.0.0-dev.0
  - dav: 2.0.0-dev.1
  - deck: 1.19.0
  - federatedfilesharing: 2.0.0-dev.1
  - federation: 2.0.0-dev.0
  - files: 3.0.0-dev.0
  - files_3dmodelviewer: 0.0.18
  - files_accesscontrol: 6.0.0
  - files_downloadlimit: 5.3.0
  - files_external: 2.0.0-dev.0
  - files_fulltextsearch: 35.0.0
  - files_lock: 35.0.0
  - files_pdfviewer: 8.0.0
  - files_reminders: 2.0.0-dev.0
  - files_sharing: 2.0.0-dev.1
  - files_trashbin: 2.0.0-dev.0
  - files_versions: 2.0.0-dev.0
  - firstrunwizard: 8.0.0
  - fulltextsearch: 35.0.0
  - fulltextsearch_elasticsearch: 35.0.0
  - guests: 4.10.0
  - integration_homeassistant: 0.0.8
  - logreader: 8.0.0
  - lookup_server_connector: 2.0.0-dev.0
  - mail: 5.12.3
  - nextcloud-aio: 0.9.0
  - nextcloud_announcements: 7.0.0
  - notes: 6.1.0
  - notifications: 8.0.0
  - notify_push: 1.4.1
  - oauth2: 2.0.0-dev.0
  - office: 1.1.0
  - oidc_login: 3.4.0
  - password_policy: 7.0.0
  - passwords: 2026.10.20
  - photos: 8.0.0
  - privacy: 7.0.0
  - profile: 2.0.0-dev.0
  - provisioning_api: 2.0.0-dev.0
  - recommendations: 8.0.0
  - related_resources: 6.0.0
  - richdocuments: 12.0.1
  - serverinfo: 7.0.0
  - settings: 2.0.0-dev.0
  - sharebymail: 2.0.0-dev.0
  - sharing: 1.0.4
  - spreed: 25.0.5
  - support: 7.0.0
  - survey_client: 7.0.0
  - suspicious_login: 13.0.0
  - systemtags: 2.0.0-dev.0
  - tasks: 0.18.1
  - text: 9.0.0
  - theming: 3.0.0-dev.0
  - twofactor_backupcodes: 2.0.0-dev.0
  - twofactor_nextcloud_notification: 9.0.0
  - twofactor_totp: 17.1.0
  - twofactor_webauthn: 2.7.1
  - updatenotification: 2.0.0-dev.0
  - user_status: 2.0.0-dev.0
  - viewer: 8.0.0
  - weather_status: 2.0.0-dev.0
  - webhook_listeners: 2.0.0-dev.0
  - whiteboard: 2.0.0
  - workflow_pdf_converter: 6.0.0
  - workflowengine: 3.0.0-dev.0
Disabled:
  - app_api: 35.0.0 (installed 33.0.0)
  - cadviewer: 10.10.7 (installed 10.10.7)
  - drawio: 4.3.8 (installed 4.3.8)
  - encryption: 3.0.0-dev.0
  - metadata: 0.24.0 (installed 0.24.0)
  - quota_warning: 1.24.0 (installed 1.24.0)
  - user_ldap: 2.0.0-dev.0

Sit tight. The database analysis stuff is brand new. It’ll likely take a few maintenance releases to smooth out the messaging, diagnostics criteria, false positives,.etc.

Also it’s interaction with more self-contained/ opinionated deployment methods such as AIO will likely.be another area of ongoing evolution and improvement.

The snippet in that check is a generic suggestion, it doesn’t read your current value, so having 256MB already set isn’t a contradiction. What it reacts to is the cache hit ratio Postgres reports (blocks found in shared buffers vs. read from disk), and that counter accumulates since the last stats reset.

Worth looking at the real numbers first:

docker exec -it nextcloud-aio-database psql -U oc_nextcloud -d nextcloud_database \
  -c "SHOW shared_buffers;" \
  -c "SELECT pg_size_pretty(pg_database_size(current_database())) AS db_size, round(100.0*blks_hit/nullif(blks_hit+blks_read,0),2) AS hit_pct FROM pg_stat_database WHERE datname=current_database();"

If hit_pct is in the high 90s, I’d just ignore the warning. A miss in shared_buffers usually still lands in the OS page cache, so on a home box it’s rarely a real bottleneck.

If it’s clearly lower and the DB is much bigger than 256MB, don’t patch postgresql.conf inside the container, AIO regenerates it. That’s better raised on the all-in-one GitHub repo as a tuning request.

How big is the database and how much RAM does the OMV machine have?

Thanks for your answer,

 shared_buffers 
----------------
 256MB
(1 row)

 db_size | hit_pct 
---------+---------
 380 MB  |   97.51
(1 row)

It seems to be fine according to what you suggested. I have no idea how big the db is, I left the AIO do all the work, and I have 8GB of ram, half of it unused. My main use of NC is just for personal and home use, 4 accounts (inc the admin) and a few files on each account, so I think 8GB is big enough. OMV is in a VM, I can increase the RAM allocated, but I doubt it will be needed. I was just concerned about that message since it said it’s a “Failed” check.

I also get the warning Warning pg.cache_hit_ratio: A significant share of page reads are missing the shared buffer cache. The reported value is 96.92% and hence lower than the suggested 99%.

I increased the size of the shared buffer from 256MB to 512MB, 1GB and now 4GB, but it didn’t change the reported value significantly. The changes only affected the first decimal.

Are there any other options to increase the hit ratio?