Nextcloud sometimes times out for a long time when there was too much load

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.4
Operating system and version (eg, Ubuntu 20.04): Official Docker image nextcloud:fpm-stable
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.21.6
PHP version (eg, 7.4): The one from the Docker image

The issue you are facing:
Sometimes when my Nextcloud instance is a bit under stress like e.g. someone uploads a large video or someone scrolls too fast through a folder with many images (i have the preview generator active) my Nextcloud simply stops working.
What this means is the app is unusable - it loads forever - and the web page just shows a 504 Gateway Time-out error.

According to Portainer the CPU load of Nextcloud is at about 15-30 percent so not too heavy but it’s definitely doing something.

I am not sure what exactly triggers this, but it’s very annoying, because the Nextcloud instance takes a really long time until it comes up again (about 15 min mostly).
Not even a restart of the Docker Nextcloud container helps. I have to restart all containers that belogn to the docker-compose stack including MariaDB.

Is this the first time you’ve seen this error? (Y/N): No

Steps to replicate it:

  1. Put Nextcloud under a bit of stress like uploading a few large files while accessing it from multiple devices etc.

The output of your Nextcloud log in Admin > Logging:
Nothing really special there, just a few deprecation warnings. But the Docker logs show this:

172.19.0.5 -  04/May/2022:18:47:12 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:47:12 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:47:12 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:47:13 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:47:13 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:47:13 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:47:15 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:25 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:25 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:25 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:25 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:26 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:26 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:27 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:52:29 +0000 "GET /index.php" 204
172.19.0.5 - Laurenz 04/May/2022:18:52:50 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:52:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:52:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:52:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:52:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:52:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:52:59 +0000 "PROPFIND /remote.php" 207
172.19.0.5 -  04/May/2022:18:53:03 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:18:53:03 +0000 "PROPFIND /remote.php" 401
172.19.0.5 - Laurenz 04/May/2022:18:53:03 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:03 +0000 "PROPFIND /remote.php" 207
172.19.0.5 -  04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 401
172.19.0.5 - Laurenz 04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 207
172.19.0.5 -  04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 401
172.19.0.5 - Laurenz 04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:04 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:28 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:28 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:28 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:47 +0000 "PROPFIND /remote.php" 207
172.19.0.5 -  04/May/2022:18:53:55 +0000 "GET /index.php" 204
172.19.0.5 - Laurenz 04/May/2022:18:53:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:53:58 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:00 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:28 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:28 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:28 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:28 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:45 +0000 "GET /index.php" 200
172.19.0.5 - Laurenz 04/May/2022:18:54:45 +0000 "GET /ocs/v2.php" 200
172.19.0.5 - Laurenz 04/May/2022:18:54:45 +0000 "GET /ocs/v2.php" 200
172.19.0.5 - Laurenz 04/May/2022:18:54:45 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:45 +0000 "GET /ocs/v2.php" 200
172.19.0.5 - Laurenz 04/May/2022:18:54:45 +0000 "GET /ocs/v2.php" 200
172.19.0.5 - Laurenz 04/May/2022:18:54:46 +0000 "GET /ocs/v2.php" 200
172.19.0.5 - Laurenz 04/May/2022:18:54:46 +0000 "GET /ocs/v2.php" 200
172.19.0.5 - Laurenz 04/May/2022:18:54:47 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:48 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:54:49 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:55:15 +0000 "HEAD /remote.php" 404
172.19.0.5 - Laurenz 04/May/2022:18:55:16 +0000 "MKCOL /remote.php" 201
172.19.0.5 - Laurenz 04/May/2022:18:55:17 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:55:17 +0000 "PUT /remote.php" 201
172.19.0.5 - Laurenz 04/May/2022:18:55:27 +0000 "PUT /remote.php" 201
172.19.0.5 -  04/May/2022:18:55:31 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:55:31 +0000 "GET /index.php" 204
172.19.0.5 - Laurenz 04/May/2022:18:55:31 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:55:31 +0000 "PROPFIND /remote.php" 207
172.19.0.5 - Laurenz 04/May/2022:18:55:29 +0000 "PUT /remote.php" 201
172.19.0.5 - Laurenz 04/May/2022:18:55:32 +0000 "PUT /remote.php" 201
172.19.0.5 - Laurenz 04/May/2022:18:55:53 +0000 "PUT /remote.php" 201
172.19.0.5 -  04/May/2022:18:57:44 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:18:58:03 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:18:58:03 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:18:59:03 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:18:59:03 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:19:01:08 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:08 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:08 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:08 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:08 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:08 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:09 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:11 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:01:11 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:02:48 +0000 "GET /remote.php" 200
172.19.0.5 -  04/May/2022:19:02:58 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:19:02:58 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:19:03:58 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:19:03:58 +0000 "PROPFIND /remote.php" 401
172.19.0.5 -  04/May/2022:19:04:34 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:05:24 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:08:04 +0000 "GET /index.php" 302
172.19.0.5 -  04/May/2022:19:08:16 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:08:17 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:08:17 +0000 "GET /index.php" 204
172.19.0.5 -  04/May/2022:19:08:59 +0000 "GET /index.php" 302
172.19.0.5 -  04/May/2022:19:10:00 +0000 "GET /index.php" 302
[04-May-2022 19:10:20] WARNING: [pool www] server reached pm.max_children setting (60), consider raising it
172.19.0.5 -  04/May/2022:19:11:07 +0000 "GET /index.php" 204

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'maintenance' => false,
  'datadirectory' => '/var/www/html/data',
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx/xx',
  'secret' => 'xxxx',
  'trusted_domains' => 
  array (
    0 => 'xxx',
  ),
  'trusted_proxies' => 
  array (
    0 => '172.16.0.0/12',
  ),
  'overwrite.cli.url' => 'https://xxx',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '23.0.4.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextadm',
  'dbpassword' => 'xxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'smtp.googlemail.com',
  'mail_smtpport' => '465',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxxx',
  'enable_previews' => true,
  'jpeg_quality' => 60,
  'preview_max_x' => 1920,
  'preview_max_y' => 1080,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\MP3',
    1 => 'OC\\Preview\\Movie',
    2 => 'OC\\Preview\\MKV',
    3 => 'OC\\Preview\\MP4',
    4 => 'OC\\Preview\\AVI',
    5 => 'OC\\Preview\\Image',
    6 => 'OC\\Preview\\TXT',
    7 => 'OC\\Preview\\MarkDown',
    8 => 'OC\\Preview\\PDF',
    9 => 'OC\\Preview\\Postscript',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'redis',
    'port' => 6379,
    'password' => 'xxx',
  ),
  'loglevel' => 0,
  'theme' => '',
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'activity_use_cached_mountpoints' => true,
  'defaultapp' => 'files',
  'simpleSignUpLink.shown' => false,
  'default_phone_region' => 'DE',
  'app_install_overwrite' => 
  array (
    0 => 'imageconverter',
    1 => 'previewgenerator',
  ),
);

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

172.19.0.1 - Laurenz [04/May/2022:19:00:04 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
2022/05/04 19:00:04 [error] 25#25: *70623 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
2022/05/04 19:00:04 [error] 25#25: *70625 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
2022/05/04 19:00:20 [error] 25#25: *70629 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/files/laurenz// HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - Laurenz [04/May/2022:19:00:20 +0000] "PROPFIND /remote.php/dav/files/laurenz// HTTP/1.1" 504 167 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:01:08 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:08 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:08 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:08 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:08 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:08 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:09 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:11 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:01:11 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:01:53 +0000] "PROPFIND /remote.php/dav/files/papa// HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:02:34 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:02:49 +0000] "GET /remote.php/dav/public-calendars/4nwG3W95M2rm4t6T?export HTTP/1.1" 200 6972 "-" "ICS Calendar 9.4.0" "85.13.138.196"
172.19.0.1 - - [04/May/2022:19:02:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 401 569 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:02:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 401 569 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:03:14 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-15_21-55-40.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:03:54 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-15_22-01-25.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
2022/05/04 19:03:58 [error] 25#25: *70656 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
2022/05/04 19:03:58 [error] 25#25: *70653 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - Laurenz [04/May/2022:19:03:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:03:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:03:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 401 569 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:03:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 401 569 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:04:34 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:04:34 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-17_05-59-00.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
2022/05/04 19:04:59 [error] 25#25: *70656 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
2022/05/04 19:04:59 [error] 25#25: *70653 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - Laurenz [04/May/2022:19:04:59 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:04:59 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:05:14 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-18_09-11-45.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:05:19 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:05:24 +0000] "HEAD /remote.php/dav/files/laurenz//Bilder%20Privat/Laurenz%20Phone/2022/05/PXL_20220504_205303091.mp4 HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:05:24 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:05:32 +0000] "GET /ocs/v2.php/cloud/user?format=json HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:05:54 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-19_09-16-01.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:06:15 +0000] "HEAD /remote.php/dav/files/laurenz//Ablage/PXL_20220504_205303091.mp4 HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:06:35 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-20_09-24-09.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:06:41 +0000] "PROPFIND /remote.php/dav/calendars/laurenz/familienkalender/ HTTP/1.1" 499 0 "-" "DAVx5/4.2.0.3-gplay (2022/03/23; dav4jvm; okhttp/4.9.3) Android/12" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:06:45 +0000] "MKCOL /remote.php/dav/uploads/laurenz/3b69dc902bc3235d49a86a161f91917e HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:07:15 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-21_11-06-05.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:07:55 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-22_14-12-48.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:08:04 +0000] "GET / HTTP/1.1" 302 5 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:08:16 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:08:17 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - - [04/May/2022:19:08:17 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:08:35 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-23_17-12-56.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:08:59 +0000] "GET / HTTP/1.1" 302 5 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "178.200.142.40"
2022/05/04 19:09:04 [error] 27#27: *70692 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "GET /login HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - - [04/May/2022:19:09:04 +0000] "GET /login HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:09:07 +0000] "HEAD /remote.php/dav/files/laurenz//Ablage/PXL_20220504_205303091.mp4 HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Papa [04/May/2022:19:09:15 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-24_17-57-16.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:09:30 +0000] "GET /index.php/apps/notify_push/uid HTTP/1.1" 499 0 "-" "-" "178.200.142.40, 172.19.0.1, 178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:09:56 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-25_18-05-45.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
2022/05/04 19:09:59 [error] 27#27: *70702 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "GET /login HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - - [04/May/2022:19:09:59 +0000] "GET /login HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:10:00 +0000] "GET /favicon.ico HTTP/1.1" 302 5 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "178.200.142.40"
2022/05/04 19:10:07 [error] 27#27: *70692 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "MKCOL /remote.php/dav/uploads/laurenz/3b69dc902bc3235d49a86a161f91917e HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - Laurenz [04/May/2022:19:10:07 +0000] "MKCOL /remote.php/dav/uploads/laurenz/3b69dc902bc3235d49a86a161f91917e HTTP/1.1" 504 167 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:10:14 +0000] "PROPFIND /remote.php/dav/files/laurenz/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/3.4.4git (Nextcloud, manjaro-5.15.32-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:10:19 +0000] "PROPFIND /remote.php/dav/files/laurenz/Bilder%20-%20Familienarchiv HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/3.4.4git (Nextcloud, manjaro-5.15.32-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:10:36 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-26_18-09-19.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:11:07 +0000] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
2022/05/04 19:11:12 [error] 27#27: *70692 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/uploads/laurenz/3b69dc902bc3235d49a86a161f91917e HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - Laurenz [04/May/2022:19:11:12 +0000] "PROPFIND /remote.php/dav/uploads/laurenz/3b69dc902bc3235d49a86a161f91917e HTTP/1.1" 504 167 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
172.19.0.1 - Laurenz [04/May/2022:19:11:16 +0000] "GET /status.php HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/3.4.4git (Nextcloud, manjaro-5.15.32-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:11:16 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-27_18-12-49.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:11:33 +0000] "GET /index.php/204 HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.0" "37.201.214.49"
2022/05/04 19:11:41 [error] 24#24: *70721 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "GET /login HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - - [04/May/2022:19:11:41 +0000] "GET /login HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:11:45 +0000] "GET /index.php/apps/notify_push/uid HTTP/1.1" 499 0 "-" "-" "178.200.142.40, 172.19.0.1, 178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:11:48 +0000] "PROPFIND /remote.php/dav/files/papa// HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:11:56 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-28_20-37-10.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:12:18 +0000] "GET /status.php HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/3.4.4git (Nextcloud, manjaro-5.15.32-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:12:28 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/ HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:12:36 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-29_20-40-24.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:13:08 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-15_21-55-40.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:13:16 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-30_21-20-05.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:13:20 +0000] "GET /status.php HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/3.4.4git (Nextcloud, manjaro-5.15.32-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)" "178.200.142.40"
2022/05/04 19:13:45 [error] 24#24: *70742 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "GET /login HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - - [04/May/2022:19:13:45 +0000] "GET /login HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:13:48 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-15_22-01-25.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:13:56 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-31_22-05-58.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
2022/05/04 19:13:58 [error] 26#26: *70744 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - - [04/May/2022:19:13:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:13:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "178.200.142.40"
2022/05/04 19:13:58 [error] 26#26: *70746 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - Laurenz [04/May/2022:19:14:00 +0000] "GET /index.php/apps/notify_push/uid HTTP/1.1" 499 0 "-" "-" "178.200.142.40, 172.19.0.1, 178.200.142.40"
172.19.0.1 - - [04/May/2022:19:14:10 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36" "178.200.142.40"
172.19.0.1 - Laurenz [04/May/2022:19:14:22 +0000] "GET /status.php HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Linux) mirall/3.4.4git (Nextcloud, manjaro-5.15.32-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:14:28 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-01-17_05-59-00.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - Papa [04/May/2022:19:14:37 +0000] "PROPFIND /remote.php/dav/files/papa//.Contacts-Backup/2020-02-01_22-41-32.vcf HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:14:39 +0000] "GET /apps/theming/icon?v=2 HTTP/1.1" 499 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "178.200.142.40"
2022/05/04 19:14:58 [error] 26#26: *70746 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
2022/05/04 19:14:58 [error] 26#26: *70744 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.19.0.1, server: , request: "PROPFIND /remote.php/dav/ HTTP/1.1", upstream: "fastcgi://172.19.0.8:9000", host: "nc.xxx.de"
172.19.0.1 - - [04/May/2022:19:14:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "178.200.142.40"
172.19.0.1 - - [04/May/2022:19:14:58 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 504 167 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.92 akonadi_davgroupware_resource_3/5.19.3 (21.12.3)" "178.200.142.40"

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

The last errors or warnings are a few days ago.

I know this is not much to work with, but it’s all i could currently think of. If you need additional logs, feel free to ask and i am happy to provide them.

Edit: Here is a screenshot of the Portainer stats page. The load is indeed a bit higher than i’ve written:
image

I also tried restarting just the MariaDB Docker container, but this didn’t change anything. The MariaDB logs also don’t show anything interesting.
I always have to restart the Nextcloud and MariaDB container to make things work again.

How many users are there on your nc?
What are your server specs?
Are you running other services or containers besides Nextcloud?

There are about 10 users on my instance, but in most cases not more than 5 are accessing it concurrently.
My Nextcloud Docker container runs on a TrueNAS system inside an Ubuntu VM that has 4 vCPU cores and 8 GB of RAM assigned to it.
The CPU is an AMD Ryzen 3 2200G.
And yes there are other containers running on the server like Bitwarden, TvHeadend and Jellyfin.

I know this could be quite a lot for the small system, but in most cases the whole system runs really smoothly.
Even when the Nextcloud is stuck and takes up a lot of CPU power (like in the screenshot above) you can use all other services just fine.
I think there must be some kind of deadlock where too many threads are accessing the same database tables, but that’s just an assumption.

Sorry for the late reply, the e-mail notifications didn’t work…

That is the answer. Sometimes it times out for long periods of time. Makes sense

Edit:
Truenas core requires 16gb ram minimum by itself. Ask their forum or docs on how to optimize.
Jellyfin is super demanding on transcoding.
And nextcloud.
(If you are running office suite for onlyoffice or collabora that is also a problem)
And only 4 core cpu for it all. Not enough.

Yikes. Does that mean ubuntu has a gui and everything in addition? Give this thing double the ram and double the cpu cores just for this truenas vm. Probably still won’t be enough, but a good start for Truenas alone.

1 Like

Hmm my TrueNAS server has 32 GB of ram, only 8GB are assigned to the Ubuntu VM.

TrueNAS, which is the base OS on my machine, has just a Web Frontend. The Ubuntu VM however has a desktop, that’s correct.
Jellyfin is inactive most of the time, at least when i had this Nextcloud timeouts.
But you are probably right, that the CPU power could be the bottleneck here.

I am still wondering why it works just flawless most of the time, but sometimes the Nextcloud completely hangs up…

Start using metrics. No reason to guess what is happening. I personally like Glances, but there are others like Prometheus.

You can start monitoring resource and network usage. Then you can adjust as needed.

All right i will set up one of these tools, maybe i find something…