Nextcloud 20.0.10 - PDF Fulltextsearch stops working - Browser crash if PDFs are in large folder ( GB ) with thousand of files

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): 20.0.10
Operating system and version (eg, Ubuntu 20.04): CentOS Linux release 7.9.2009
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.6-97
PHP version (eg, 7.4): php 7.3.28-1
Elasticsearch version: 7.13.0-1
Redis Memcache: redis-3.2.12-2
MariaDB version: 10.5.10-1

The issue you are facing:
We plan to use a Fullindex System for one of our Departements for our PDF files and NextCloud seem to be very well for this. I setup a testsystem where we have ~70.000 PDF Files with a average filesize of ~50kb-200kb. We have folder with only few files in and some with several tousend. That folders have a total filesize of 500M-5GB. If we want to search for files within that large folders, the browser goes into wait mode and crashes.

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

Steps to replicate it:

  1. Search for pattern with search function of Nextcloud
  2. Click on PDF file with correct pattern found in on of the large folder
  3. Browser tries to open file but started to hang and you have to click on ‘stop wait’ to use the browser again

The output of your Nextcloud log in Admin > Logging:

{"reqId":"AuoiAdqJnXPC2qVRc1dS","level":0,"time":"2021-05-28T17:10:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Finished OCA\\FullTextSearch\\Cron\\Index job with ID 35 in 0 seconds","userAgent":"--","version":"20.0.10.1"}
{"reqId":"YLEj8nbwCE88KV484oC-7wAAAAA","level":0,"time":"2021-05-28T17:10:10+00:00","remoteAddr":"10.234.14.136","user":"root","app":"files_external","method":"GET","url":"/index.php/apps/files/ajax/getstoragestats.php?dir=%2FArchiv%2F20201207%2F","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"20.0.10.1"}
{"reqId":"YLEj8nbwCE88KV484oC-7wAAAAA","level":0,"time":"2021-05-28T17:10:10+00:00","remoteAddr":"10.234.14.136","user":"root","app":"files_sharing","method":"GET","url":"/index.php/apps/files/ajax/getstoragestats.php?dir=%2FArchiv%2F20201207%2F","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"20.0.10.1"}
{"reqId":"YLEj8gO039U47jcn-jvA4gAAAAc","level":0,"time":"2021-05-28T17:10:10+00:00","remoteAddr":"10.234.14.136","user":"root","app":"files_external","method":"GET","url":"/ocs/v1.php/apps/files_external/api/v1/mounts?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"20.0.10.1"}
{"reqId":"YLEj8gO039U47jcn-jvA4gAAAAc","level":0,"time":"2021-05-28T17:10:10+00:00","remoteAddr":"10.234.14.136","user":"root","app":"files_sharing","method":"GET","url":"/ocs/v1.php/apps/files_external/api/v1/mounts?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"20.0.10.1"}

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

<?php
$CONFIG = array (
  'instanceid' => '************',
  'passwordsalt' => '************',
  'secret' => '************',
  'trusted_domains' => 
  array (
    0 => '************',
    1 => '************',
    2 => '************',
    3 => 'localhost',
    4 => '************',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.10.1',
  'overwrite.cli.url' => '************',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_root',
  'dbpassword' => '************',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'log_type' => 'owncloud',
  'logfile' => '/var/log/nextcloud.log',
  'loglevel' => '0',
  'log_rotate_size' => '104857600',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0,
    'trashbin_retention_obligation' => 'auto',
  ),
);

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

tail -f -n 20 /var/log/httpd/error_log 
[Fri May 28 18:06:29.053150 2021] [mpm_prefork:notice] [pid 1068] AH00171: Graceful restart requested, doing restart
[Fri May 28 18:06:29.106550 2021] [lbmethod_heartbeat:notice] [pid 1068] AH02282: No slotmem from mod_heartmonitor
[Fri May 28 18:06:29.107572 2021] [ssl:warn] [pid 1068] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri May 28 18:06:29.107655 2021] [ssl:warn] [pid 1068] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri May 28 18:06:29.143260 2021] [mpm_prefork:notice] [pid 1068] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.3.28 configured -- resuming normal operations
[Fri May 28 18:06:29.143276 2021] [core:notice] [pid 1068] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Fri May 28 18:06:35.268722 2021] [access_compat:error] [pid 5425] [client 10.234.14.136:61886] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Fri May 28 18:20:25.463303 2021] [access_compat:error] [pid 5430] [client 10.234.14.136:62053] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Fri May 28 18:35:47.757294 2021] [mpm_prefork:notice] [pid 1068] AH00170: caught SIGWINCH, shutting down gracefully
[Fri May 28 18:35:48.854170 2021] [core:notice] [pid 6227] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri May 28 18:35:48.855278 2021] [suexec:notice] [pid 6227] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 28 18:35:48.856339 2021] [ssl:warn] [pid 6227] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri May 28 18:35:48.856424 2021] [ssl:warn] [pid 6227] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri May 28 18:35:48.881079 2021] [lbmethod_heartbeat:notice] [pid 6227] AH02282: No slotmem from mod_heartmonitor
[Fri May 28 18:35:48.882101 2021] [ssl:warn] [pid 6227] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri May 28 18:35:48.882185 2021] [ssl:warn] [pid 6227] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri May 28 18:35:48.925269 2021] [mpm_prefork:notice] [pid 6227] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.3.28 configured -- resuming normal operations
[Fri May 28 18:35:48.925302 2021] [core:notice] [pid 6227] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Fri May 28 18:43:20.630528 2021] [access_compat:error] [pid 6319] [client 10.234.14.136:62560] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Fri May 28 19:02:30.054773 2021] [access_compat:error] [pid 6228] [client 10.234.14.136:62762] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata

your large pdf files are stored in Group folder features? if yes transfer your files to other folder

and try to disable the group folder. and monitor

Hello sinichi,

Thank You very much for your reply. Actually it’s not a “group folder” feature. It’s a second disk as LVM on the VM and i configured it as “external storage”. If i exclude the large folders the search function works great and fast but if i include them it’s not working. I was reading a bit on Nextcloud Github and it seems there are several people who have the same issue. Most of them say that it’s a Nextcloud Index-table-DB “design issue” and doesn’t work together with lot of files… Some of them posted some DB tweeks but they didn’t really help. I’m a bit lost here. Nextcloud is pretty nice but if it just can’t even handle large amount of files it’s pity :frowning: