Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php occ files:scan exceeds maximal number of parameters while deleting files with PostgreSQL #25732

Closed
frlan opened this issue Feb 20, 2021 · 20 comments · Fixed by #29281
Closed
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: occ

Comments

@frlan
Copy link

frlan commented Feb 20, 2021

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Many files ((incl. previews)
  2. Run php occ files:scan

Expected behaviour

The filecache is cleaned up.

Actual behaviour

I'm getting this exception:

Exception during scan: An exception occurred while executing 'DELETE FROM "oc_filecache" WHERE "parent IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,  
… 1MB of query …
SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535
#0 /srv/nc/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(169): Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /srv/nc/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(149): Doctrine\DBAL\DBALException::wrapException(Object(Doctrine\DBAL\Driver\PDOPgSql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'An exception oc...')
#2 /srv/nc/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1071): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOPgSql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'DELETE FROM "oc...', Array)
#3 /srv/nc/lib/private/DB/Connection.php(222): Doctrine\DBAL\Connection->executeUpdate('DELETE FROM "oc...', Array, Array)
#4 /srv/nc/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(209): OC\DB\Connection->executeUpdate('DELETE FROM "oc...', Array, Array)
#5 /srv/nc/lib/private/DB/QueryBuilder/QueryBuilder.php(217): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /srv/nc/lib/private/Files/Cache/Cache.php(591): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /srv/nc/lib/private/Files/Cache/Cache.php(537): OC\Files\Cache\Cache->removeChildren(Object(OC\Files\Cache\CacheEntry))
#8 /srv/nc/lib/private/Files/Cache/Scanner.php(273): OC\Files\Cache\Cache->remove('files_encryptio...')
#9 /srv/nc/lib/private/Files/Cache/Scanner.php(460): OC\Files\Cache\Scanner->removeFromCache('files_encryptio...')
#10 /srv/nc/lib/private/Files/Cache/Scanner.php(388): OC\Files\Cache\Scanner->handleChildren('', true, 3, 255, true, 0)
#11 /srv/nc/lib/private/Files/Cache/Scanner.php(340): OC\Files\Cache\Scanner->scanChildren('', true, 3, 255, true)
#12 /srv/nc/lib/private/Files/Utils/Scanner.php(260): OC\Files\Cache\Scanner->scan('', true, 3)
#13 /srv/nc/apps/files/lib/Command/Scan.php(152): OC\Files\Utils\Scanner->scan('/frlan', true, NULL)
#14 /srv/nc/apps/files/lib/Command/Scan.php(208): OCA\Files\Command\Scan->scanFiles('frlan', '/frlan', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#15 /srv/nc/apps/bookmarks/vendor/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /srv/nc/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /srv/nc/apps/bookmarks/vendor/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /srv/nc/apps/bookmarks/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /srv/nc/apps/bookmarks/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /srv/nc/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /srv/nc/console.php(100): OC\Console\Application->run()
#22 /srv/nc/occ(11): require_once('/srv/nc/console...')
#23 {main}

Server configuration

Operating system:

Debian Buster

Web server:

--

Database:

PostgrSQL

PHP version:

PHP 7.3.x

Nextcloud version: (see Nextcloud admin page)

20.0.7

Updated from an older Nextcloud/ownCloud or fresh install:

Updated

Where did you install Nextcloud from:

Signing status:

No errors have been found.

``

List of activated apps:

<details>
<summary>Enabled:
  - accessibility: 1.6.0
  - activity: 2.13.4
  - admin_audit: 1.10.0
  - apporder: 0.11.0
  - bookmarks: 4.1.0
  - bruteforcesettings: 2.0.1
  - calendar: 2.1.3
  - camerarawpreviews: 0.7.10
  - cloud_federation_api: 1.3.0
  - comments: 1.10.0
  - contacts: 3.4.3
  - contactsinteraction: 1.1.0
  - cookbook: 0.8.1
  - dashboard: 7.0.0
  - dav: 1.16.2
  - event_update_notification: 1.2.0
  - federatedfilesharing: 1.10.2
  - federation: 1.10.1
  - files: 1.15.0
  - files_accesscontrol: 1.10.2
  - files_external: 1.11.1
  - files_markdown: 2.3.1
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.2
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - firstrunwizard: 2.9.0
  - gpxpod: 4.2.6
  - integration_discourse: 0.0.9
  - integration_github: 0.0.20
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - maps: 0.1.8
  - metadata: 0.12.0
  - music: 1.0.2
  - nextcloud_announcements: 1.9.0
  - notes: 4.0.2
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - password_policy: 1.10.1
  - photos: 1.2.3
  - previewgenerator: 3.1.1
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - quota_warning: 1.9.1
  - recommendations: 0.8.0
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - socialsharing_facebook: 2.1.0
  - socialsharing_twitter: 2.1.0
  - support: 1.3.0
  - survey_client: 1.8.0
  - systemtags: 1.10.0
  - tasks: 0.13.6
  - text: 3.1.0
  - twofactor_backupcodes: 1.9.0
  - updatenotification: 1.10.0
  - user_status: 1.0.1
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.0
Disabled:
  - checksum
  - encryption
  - files_automatedtagging
  - files_readmemd
  - files_videoplayer
  - gpxedit
  - theming
  - user_ldap</summary>

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@frlan frlan added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 20, 2021
@szaimen
Copy link
Contributor

szaimen commented Jun 23, 2021

Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :)

@danielschemmel
Copy link

danielschemmel commented Jun 27, 2021

I can verify that this issue (or at least a very similar one) is still valid in NC21.0.2 (derived from docker image nextcloud:21-fpm version 8eb7ad57d08d):

Exception during scan: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535
#0 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1728): Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1667): Doctrine\DBAL\Connection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#2 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1146): Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), 'DELETE FROM "oc...', Array, Array)
#3 /var/www/html/lib/private/DB/Connection.php(257): Doctrine\DBAL\Connection->executeStatement('DELETE FROM "oc...', Array, Array)
#4 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(213): OC\DB\Connection->executeStatement('DELETE FROM "oc...', Array, Array)
#5 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/html/lib/private/Files/Cache/Cache.php(606): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/html/lib/private/Files/Cache/Cache.php(550): OC\Files\Cache\Cache->removeChildren(Object(OC\Files\Cache\CacheEntry))
#8 /var/www/html/lib/private/Files/Cache/Scanner.php(274): OC\Files\Cache\Cache->remove('valheru-backup')
#9 /var/www/html/lib/private/Files/Cache/Scanner.php(465): OC\Files\Cache\Scanner->removeFromCache('valheru-backup')
#10 /var/www/html/lib/private/Files/Cache/Scanner.php(389): OC\Files\Cache\Scanner->handleChildren('', true, 3, 47556, true, 12727)
#11 /var/www/html/lib/private/Files/Cache/Scanner.php(341): OC\Files\Cache\Scanner->scanChildren('', true, 3, 47556, true)
#12 /var/www/html/lib/private/Files/Utils/Scanner.php(260): OC\Files\Cache\Scanner->scan('', true, 3)
#13 /var/www/html/apps/files/lib/Command/Scan.php(158): OC\Files\Utils\Scanner->scan('/danielschemmel', true, NULL)
#14 /var/www/html/apps/files/lib/Command/Scan.php(214): OCA\Files\Command\Scan->scanFiles('danielschemmel', '/danielschemmel', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#15 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/console.php(100): OC\Console\Application->run()
#22 /var/www/html/occ(11): require_once('/var/www/html/c...')
#23 {main}

Server configuration

Operating system: Docker on QNAP

Web server: nginx (behind another nginx reverse proxy)

Database: PostgreSQL 13.3

PHP version: 7.4.20

Nextcloud version: 21.0.2

Updated from an older Nextcloud/ownCloud or fresh install:
Updated, original install was NC20 iirc.

Where did you install Nextcloud from:
Docker installation similar to https://github.com/nextcloud/docker/tree/6b6c68cabfc745ca94e3fe64145f5e04dffeecf3/.examples/docker-compose/with-nginx-proxy/postgres/fpm

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.7.0
  - activity: 2.14.3
  - bruteforcesettings: 2.2.0
  - calendar: 2.2.2
  - camerarawpreviews: 0.7.11
  - checksum: 1.1.2
  - cloud_federation_api: 1.4.0
  - comments: 1.11.0
  - contacts: 3.5.1
  - dashboard: 7.1.0
  - dav: 1.17.1
  - deck: 1.4.2
  - external: 3.8.2
  - extract: 1.3.1
  - federatedfilesharing: 1.11.0
  - federation: 1.11.0
  - files: 1.16.0
  - files_external: 1.12.0
  - files_pdfviewer: 2.1.0
  - files_rightclick: 1.0.0
  - files_sharing: 1.13.1
  - files_trashbin: 1.11.0
  - files_versions: 1.14.0
  - files_videoplayer: 1.10.0
  - firstrunwizard: 2.10.0
  - forms: 2.2.4
  - groupfolders: 9.0.2
  - impersonate: 1.8.0
  - integration_gitlab: 1.0.0
  - logreader: 2.6.0
  - lookup_server_connector: 1.9.0
  - nextcloud_announcements: 1.10.0
  - notes: 4.0.4
  - notifications: 2.9.0
  - oauth2: 1.9.0
  - password_policy: 1.11.0
  - photos: 1.3.0
  - privacy: 1.5.0
  - provisioning_api: 1.11.0
  - recommendations: 1.0.0
  - richdocuments: 4.1.2
  - serverinfo: 1.11.0
  - settings: 1.3.0
  - sharebymail: 1.11.0
  - spreed: 11.2.2
  - systemtags: 1.11.0
  - talk_matterbridge: 1.22.4
  - tasks: 0.13.6
  - text: 3.2.0
  - theming: 1.12.0
  - twofactor_backupcodes: 1.10.0
  - twofactor_u2f: 6.2.0
  - updatenotification: 1.11.0
  - user_saml: 4.1.1
  - viewer: 1.5.0
  - weather_status: 1.1.0
  - workflow_pdf_converter: 1.6.0
  - workflowengine: 2.3.0
Disabled:
  - admin_audit
  - contactsinteraction
  - encryption
  - support
  - survey_client
  - user_ldap
  - user_status

Nextcloud configuration:

Config report I replaced the actual domain name with `my.domain.name`.

{
    "system": {
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "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
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "my.domain.name"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "21.0.2.1",
        "overwrite.cli.url": "http:\/\/my.domain.name",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "loglevel": 0,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE"
    }
}

Are you using external storage, if yes which one: local+smb/cifs

Are you using encryption: no

Are you using an external user-backend, if yes which one: Not anymore (SAML SSO was in use for some time before)

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log The logfiles have become very large, primarily due to entries taking up multiple *megabytes* for a single entry like the following originally ~15MB line. Notice the `[SNIP]`s to keep the report size incheck.

{
  "reqId": "3zN2GvaAGnvd0BzGSHiL",
  "level": 4,
  "time": "2021-06-27T00:05:14+00:00",
  "remoteAddr": "172.29.44.1",
  "user": "danielschemmel",
  "app": "webdav",
  "method": "PROPFIND",
  "url": "/remote.php/dav/files/danielschemmel/",
  "message": {
    "Exception": "Doctrine\\DBAL\\Exception\\DriverException",
    "Message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535",
    "Code": 7,
    "Trace": [
      {
        "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
        "line": 1728,
        "function": "convert",
        "class": "Doctrine\\DBAL\\Driver\\API\\PostgreSQL\\ExceptionConverter",
        "type": "->",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
          },
          {
            "__class__": "Doctrine\\DBAL\\Query"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
        "line": 1667,
        "function": "handleDriverException",
        "class": "Doctrine\\DBAL\\Connection",
        "type": "->",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
          },
          {
            "__class__": "Doctrine\\DBAL\\Query"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
        "line": 1146,
        "function": "convertExceptionDuringQuery",
        "class": "Doctrine\\DBAL\\Connection",
        "type": "->",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Driver\\PDO\\Exception"
          },
          "DELETE FROM \"oc_filecache\" WHERE \"parent\" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
          [
            47565,
            183172,
            183173,
            315763,
            315764,
            315765,
            315766,
            315767,
            315768,
            183252,
            183251,
            183181
          ],
          [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/DB/Connection.php",
        "line": 257,
        "function": "executeStatement",
        "class": "Doctrine\\DBAL\\Connection",
        "type": "->",
        "args": [
          "DELETE FROM \"oc_filecache\" WHERE \"parent\" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
          [
            47565,
            183172,
            183173,
            315763,
            183256,
            183249,
            183250,
            183252,
            183251,
            183181
          ],
          [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
        "line": 213,
        "function": "executeStatement",
        "class": "OC\\DB\\Connection",
        "type": "->",
        "args": [
          "DELETE FROM \"oc_filecache\" WHERE \"parent\" IN (:dcValue1)",
          {
            "dcValue1": [
              47565,
              183172,
              183173,
              315763,
              183250,
              183252,
              183251,
              183181
            ]
          },
          {
            "dcValue1": 101
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
        "line": 287,
        "function": "execute",
        "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/lib/private/Files/Cache/Cache.php",
        "line": 606,
        "function": "execute",
        "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/lib/private/Files/Cache/Cache.php",
        "line": 550,
        "function": "removeChildren",
        "class": "OC\\Files\\Cache\\Cache",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Cache\\CacheEntry"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
        "line": 274,
        "function": "remove",
        "class": "OC\\Files\\Cache\\Cache",
        "type": "->",
        "args": [
          "valheru-backup"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
        "line": 465,
        "function": "removeFromCache",
        "class": "OC\\Files\\Cache\\Scanner",
        "type": "->",
        "args": [
          "valheru-backup"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
        "line": 389,
        "function": "handleChildren",
        "class": "OC\\Files\\Cache\\Scanner",
        "type": "->",
        "args": [
          "",
          false,
          3,
          47556,
          true,
          -1
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
        "line": 341,
        "function": "scanChildren",
        "class": "OC\\Files\\Cache\\Scanner",
        "type": "->",
        "args": [
          "",
          false,
          3,
          47556,
          true
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 1346,
        "function": "scan",
        "class": "OC\\Files\\Cache\\Scanner",
        "type": "->",
        "args": [
          "",
          false
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 1390,
        "function": "getCacheEntry",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          {
            "cache": {
              "__class__": "OC\\Files\\Cache\\Cache"
            },
            "scanner": {
              "__class__": "OC\\Files\\Cache\\Scanner"
            },
            "watcher": null,
            "propagator": null,
            "updater": null,
            "__class__": "OCA\\Files_Trashbin\\Storage"
          },
          "",
          "/nas"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
        "line": 331,
        "function": "getFileInfo",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "/danielschemmel/files/nas",
          false
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 765,
        "function": "getQuotaInfo",
        "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/PropFind.php",
        "line": 95,
        "function": "Sabre\\DAV\\{closure}",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 769,
        "function": "handle",
        "class": "Sabre\\DAV\\PropFind",
        "type": "->",
        "args": [
          "{DAV:}quota-available-bytes",
          {
            "__class__": "Closure"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "propFind",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\DAV\\PropFind"
          },
          {
            "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1052,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "propFind",
          [
            {
              "__class__": "Sabre\\DAV\\PropFind"
            },
            {
              "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 984,
        "function": "getPropertiesByNode",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\DAV\\PropFind"
          },
          {
            "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1661,
        "function": "getPropertiesIteratorForPath",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "files/danielschemmel",
          [
            "{DAV:}getlastmodified",
            "{DAV:}getetag",
            "{DAV:}getcontenttype",
            "{DAV:}resourcetype",
            "{http://owncloud.org/ns}fileid",
            "{http://owncloud.org/ns}permissions",
            "{http://owncloud.org/ns}size",
            "{DAV:}getcontentlength",
            "{DAV:}quota-available-bytes",
            "{http://nextcloud.org/ns}has-preview",
            "{http://nextcloud.org/ns}mount-type",
            "{http://nextcloud.org/ns}is-encrypted",
            "{http://open-collaboration-services.org/ns}share-permissions",
            "{http://owncloud.org/ns}tags",
            "{http://owncloud.org/ns}favorite",
            "{http://owncloud.org/ns}comments-unread",
            "{http://owncloud.org/ns}owner-id",
            "{http://owncloud.org/ns}owner-display-name",
            "{http://owncloud.org/ns}share-types"
          ],
          1
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1646,
        "function": "writeMultiStatus",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "elementMap": [],
            "contextUri": "/remote.php/dav/",
            "namespaceMap": {
              "DAV:": "d",
              "http://sabredav.org/ns": "s",
              "http://owncloud.org/ns": "oc",
              "http://nextcloud.org/ns": "nc"
            },
            "classMap": [],
            "__class__": "Sabre\\Xml\\Writer"
          },
          {
            "__class__": "Generator"
          },
          false
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 346,
        "function": "generateMultiStatus",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Generator"
          },
          false
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpPropFind",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:PROPFIND",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Server.php",
        "line": 332,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/remote.php",
        "line": 167,
        "args": [
          "/var/www/html/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php",
    "Line": 83,
    "Previous": {
      "Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
      "Message": "SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535",
      "Code": 7,
      "Trace": [
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "line": 84,
          "function": "new",
          "class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
          "type": "::",
          "args": [
            {
              "errorInfo": [
                "HY000",
                7,
                "number of parameters must be between 0 and 65535"
              ],
              "__class__": "PDOException"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1136,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/DB/Connection.php",
          "line": 257,
          "function": "executeStatement",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->",
          "args": [
            "DELETE FROM \"oc_filecache\" WHERE \"parent\" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
            [
              47565,
              183172,
              183173,
              315763,
              183249,
              183250,
              183252,
              183251,
              183181
            ],
            [
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1
            ]
          ]
        },
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line": 213,
          "function": "executeStatement",
          "class": "OC\\DB\\Connection",
          "type": "->",
          "args": [
            "DELETE FROM \"oc_filecache\" WHERE \"parent\" IN (:dcValue1)",
            {
              "dcValue1": [
                47565,
                183172,
                183173,
                315763,
                183250,
                183252,
                183251,
                183181
              ]
            },
            {
              "dcValue1": 101
            }
          ]
        },
        {
          "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line": 287,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Files/Cache/Cache.php",
          "line": 606,
          "function": "execute",
          "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Files/Cache/Cache.php",
          "line": 550,
          "function": "removeChildren",
          "class": "OC\\Files\\Cache\\Cache",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Files\\Cache\\CacheEntry"
            }
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
          "line": 274,
          "function": "remove",
          "class": "OC\\Files\\Cache\\Cache",
          "type": "->",
          "args": [
            "valheru-backup"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
          "line": 465,
          "function": "removeFromCache",
          "class": "OC\\Files\\Cache\\Scanner",
          "type": "->",
          "args": [
            "valheru-backup"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
          "line": 389,
          "function": "handleChildren",
          "class": "OC\\Files\\Cache\\Scanner",
          "type": "->",
          "args": [
            "",
            false,
            3,
            47556,
            true,
            -1
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
          "line": 341,
          "function": "scanChildren",
          "class": "OC\\Files\\Cache\\Scanner",
          "type": "->",
          "args": [
            "",
            false,
            3,
            47556,
            true
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/View.php",
          "line": 1346,
          "function": "scan",
          "class": "OC\\Files\\Cache\\Scanner",
          "type": "->",
          "args": [
            "",
            false
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/View.php",
          "line": 1390,
          "function": "getCacheEntry",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": [
            {
              "cache": {
                "__class__": "OC\\Files\\Cache\\Cache"
              },
              "scanner": {
                "__class__": "OC\\Files\\Cache\\Scanner"
              },
              "watcher": null,
              "propagator": null,
              "updater": null,
              "__class__": "OCA\\Files_Trashbin\\Storage"
            },
            "",
            "/nas"
          ]
        },
        {
          "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
          "line": 331,
          "function": "getFileInfo",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": [
            "/danielschemmel/files/nas",
            false
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
          "line": 765,
          "function": "getQuotaInfo",
          "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/PropFind.php",
          "line": 95,
          "function": "Sabre\\DAV\\{closure}",
          "class": "Sabre\\DAV\\CorePlugin",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
          "line": 769,
          "function": "handle",
          "class": "Sabre\\DAV\\PropFind",
          "type": "->",
          "args": [
            "{DAV:}quota-available-bytes",
            {
              "__class__": "Closure"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
          "line": 89,
          "function": "propFind",
          "class": "Sabre\\DAV\\CorePlugin",
          "type": "->",
          "args": [
            {
              "__class__": "Sabre\\DAV\\PropFind"
            },
            {
              "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 1052,
          "function": "emit",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [
            "propFind",
            [
              {
                "__class__": "Sabre\\DAV\\PropFind"
              },
              {
                "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
              }
            ]
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 984,
          "function": "getPropertiesByNode",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [
            {
              "__class__": "Sabre\\DAV\\PropFind"
            },
            {
              "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 1661,
          "function": "getPropertiesIteratorForPath",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [
            "files/danielschemmel",
            [
              "{DAV:}getlastmodified",
              "{DAV:}getetag",
              "{DAV:}getcontenttype",
              "{DAV:}resourcetype",
              "{http://owncloud.org/ns}fileid",
              "{http://owncloud.org/ns}permissions",
              "{http://owncloud.org/ns}size",
              "{DAV:}getcontentlength",
              "{DAV:}quota-available-bytes",
              "{http://nextcloud.org/ns}has-preview",
              "{http://nextcloud.org/ns}mount-type",
              "{http://nextcloud.org/ns}is-encrypted",
              "{http://open-collaboration-services.org/ns}share-permissions",
              "{http://owncloud.org/ns}tags",
              "{http://owncloud.org/ns}favorite",
              "{http://owncloud.org/ns}comments-unread",
              "{http://owncloud.org/ns}owner-id",
              "{http://owncloud.org/ns}owner-display-name",
              "{http://owncloud.org/ns}share-types"
            ],
            1
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 1646,
          "function": "writeMultiStatus",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [
            {
              "elementMap": [],
              "contextUri": "/remote.php/dav/",
              "namespaceMap": {
                "DAV:": "d",
                "http://sabredav.org/ns": "s",
                "http://owncloud.org/ns": "oc",
                "http://nextcloud.org/ns": "nc"
              },
              "classMap": [],
              "__class__": "Sabre\\Xml\\Writer"
            },
            {
              "__class__": "Generator"
            },
            false
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
          "line": 346,
          "function": "generateMultiStatus",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [
            {
              "__class__": "Generator"
            },
            false
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
          "line": 89,
          "function": "httpPropFind",
          "class": "Sabre\\DAV\\CorePlugin",
          "type": "->",
          "args": [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 472,
          "function": "emit",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [
            "method:PROPFIND",
            [
              {
                "__class__": "Sabre\\HTTP\\Request"
              },
              {
                "__class__": "Sabre\\HTTP\\Response"
              }
            ]
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 253,
          "function": "invokeMethod",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 321,
          "function": "start",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/apps/dav/lib/Server.php",
          "line": 332,
          "function": "exec",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
          "line": 35,
          "function": "exec",
          "class": "OCA\\DAV\\Server",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/remote.php",
          "line": 167,
          "args": [
            "/var/www/html/apps/dav/appinfo/v2/remote.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
      "Line": 26,
      "Previous": {
        "Exception": "PDOException",
        "Message": "SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535",
        "Code": "HY000",
        "Trace": [
          {
            "file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
            "line": 82,
            "function": "execute",
            "class": "PDOStatement",
            "type": "->",
            "args": [
              null
            ]
          },
          {
            "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
            "line": 1136,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/html/lib/private/DB/Connection.php",
            "line": 257,
            "function": "executeStatement",
            "class": "Doctrine\\DBAL\\Connection",
            "type": "->",
            "args": [
              "DELETE FROM \"oc_filecache\" WHERE \"parent\" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
              [
                47565,
                183172,
                183173,
                315763,
                183252,
                183251,
                183181
              ],
              [
                1,
                1,
                1,
                1,
                1,
                1,
                1,
                1,
                1,
                1,
                1
              ]
            ]
          },
          {
            "file": "/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line": 213,
            "function": "executeStatement",
            "class": "OC\\DB\\Connection",
            "type": "->",
            "args": [
              "DELETE FROM \"oc_filecache\" WHERE \"parent\" IN (:dcValue1)",
              {
                "dcValue1": [
                  47565,
                  183172,
                  183173,
                  315763,
                  183250,
                  183252,
                  183251,
                  183181
                ]
              },
              {
                "dcValue1": 101
              }
            ]
          },
          {
            "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line": 287,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/html/lib/private/Files/Cache/Cache.php",
            "line": 606,
            "function": "execute",
            "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/html/lib/private/Files/Cache/Cache.php",
            "line": 550,
            "function": "removeChildren",
            "class": "OC\\Files\\Cache\\Cache",
            "type": "->",
            "args": [
              {
                "__class__": "OC\\Files\\Cache\\CacheEntry"
              }
            ]
          },
          {
            "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
            "line": 274,
            "function": "remove",
            "class": "OC\\Files\\Cache\\Cache",
            "type": "->",
            "args": [
              "valheru-backup"
            ]
          },
          {
            "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
            "line": 465,
            "function": "removeFromCache",
            "class": "OC\\Files\\Cache\\Scanner",
            "type": "->",
            "args": [
              "valheru-backup"
            ]
          },
          {
            "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
            "line": 389,
            "function": "handleChildren",
            "class": "OC\\Files\\Cache\\Scanner",
            "type": "->",
            "args": [
              "",
              false,
              3,
              47556,
              true,
              -1
            ]
          },
          {
            "file": "/var/www/html/lib/private/Files/Cache/Scanner.php",
            "line": 341,
            "function": "scanChildren",
            "class": "OC\\Files\\Cache\\Scanner",
            "type": "->",
            "args": [
              "",
              false,
              3,
              47556,
              true
            ]
          },
          {
            "file": "/var/www/html/lib/private/Files/View.php",
            "line": 1346,
            "function": "scan",
            "class": "OC\\Files\\Cache\\Scanner",
            "type": "->",
            "args": [
              "",
              false
            ]
          },
          {
            "file": "/var/www/html/lib/private/Files/View.php",
            "line": 1390,
            "function": "getCacheEntry",
            "class": "OC\\Files\\View",
            "type": "->",
            "args": [
              {
                "cache": {
                  "__class__": "OC\\Files\\Cache\\Cache"
                },
                "scanner": {
                  "__class__": "OC\\Files\\Cache\\Scanner"
                },
                "watcher": null,
                "propagator": null,
                "updater": null,
                "__class__": "OCA\\Files_Trashbin\\Storage"
              },
              "",
              "/nas"
            ]
          },
          {
            "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
            "line": 331,
            "function": "getFileInfo",
            "class": "OC\\Files\\View",
            "type": "->",
            "args": [
              "/danielschemmel/files/nas",
              false
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
            "line": 765,
            "function": "getQuotaInfo",
            "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/PropFind.php",
            "line": 95,
            "function": "Sabre\\DAV\\{closure}",
            "class": "Sabre\\DAV\\CorePlugin",
            "type": "->",
            "args": [
              "*** sensitive parameters replaced ***"
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
            "line": 769,
            "function": "handle",
            "class": "Sabre\\DAV\\PropFind",
            "type": "->",
            "args": [
              "{DAV:}quota-available-bytes",
              {
                "__class__": "Closure"
              }
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
            "line": 89,
            "function": "propFind",
            "class": "Sabre\\DAV\\CorePlugin",
            "type": "->",
            "args": [
              {
                "__class__": "Sabre\\DAV\\PropFind"
              },
              {
                "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
              }
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 1052,
            "function": "emit",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": [
              "propFind",
              [
                {
                  "__class__": "Sabre\\DAV\\PropFind"
                },
                {
                  "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
                }
              ]
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 984,
            "function": "getPropertiesByNode",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": [
              {
                "__class__": "Sabre\\DAV\\PropFind"
              },
              {
                "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
              }
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 1661,
            "function": "getPropertiesIteratorForPath",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": [
              "files/danielschemmel",
              [
                "{DAV:}getlastmodified",
                "{DAV:}getetag",
                "{DAV:}getcontenttype",
                "{DAV:}resourcetype",
                "{http://owncloud.org/ns}fileid",
                "{http://owncloud.org/ns}permissions",
                "{http://owncloud.org/ns}size",
                "{DAV:}getcontentlength",
                "{DAV:}quota-available-bytes",
                "{http://nextcloud.org/ns}has-preview",
                "{http://nextcloud.org/ns}mount-type",
                "{http://nextcloud.org/ns}is-encrypted",
                "{http://open-collaboration-services.org/ns}share-permissions",
                "{http://owncloud.org/ns}tags",
                "{http://owncloud.org/ns}favorite",
                "{http://owncloud.org/ns}comments-unread",
                "{http://owncloud.org/ns}owner-id",
                "{http://owncloud.org/ns}owner-display-name",
                "{http://owncloud.org/ns}share-types"
              ],
              1
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 1646,
            "function": "writeMultiStatus",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": [
              {
                "elementMap": [],
                "contextUri": "/remote.php/dav/",
                "namespaceMap": {
                  "DAV:": "d",
                  "http://sabredav.org/ns": "s",
                  "http://owncloud.org/ns": "oc",
                  "http://nextcloud.org/ns": "nc"
                },
                "classMap": [],
                "__class__": "Sabre\\Xml\\Writer"
              },
              {
                "__class__": "Generator"
              },
              false
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
            "line": 346,
            "function": "generateMultiStatus",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": [
              {
                "__class__": "Generator"
              },
              false
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
            "line": 89,
            "function": "httpPropFind",
            "class": "Sabre\\DAV\\CorePlugin",
            "type": "->",
            "args": [
              {
                "__class__": "Sabre\\HTTP\\Request"
              },
              {
                "__class__": "Sabre\\HTTP\\Response"
              }
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 472,
            "function": "emit",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": [
              "method:PROPFIND",
              [
                {
                  "__class__": "Sabre\\HTTP\\Request"
                },
                {
                  "__class__": "Sabre\\HTTP\\Response"
                }
              ]
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 253,
            "function": "invokeMethod",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": [
              {
                "__class__": "Sabre\\HTTP\\Request"
              },
              {
                "__class__": "Sabre\\HTTP\\Response"
              }
            ]
          },
          {
            "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line": 321,
            "function": "start",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/html/apps/dav/lib/Server.php",
            "line": 332,
            "function": "exec",
            "class": "Sabre\\DAV\\Server",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
            "line": 35,
            "function": "exec",
            "class": "OCA\\DAV\\Server",
            "type": "->",
            "args": []
          },
          {
            "file": "/var/www/html/remote.php",
            "line": 167,
            "args": [
              "/var/www/html/apps/dav/appinfo/v2/remote.php"
            ],
            "function": "require_once"
          }
        ],
        "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
        "Line": 82
      }
    },
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0",
  "version": "21.0.2.1"
}

Browser log

Browser log No browser interaction

@szaimen
Copy link
Contributor

szaimen commented Jun 27, 2021

Could you please add some steps how to reproduce? Thanks!

@danielschemmel
Copy link

I did not yet have time to do a full from-scratch repro, but the easiest way to trigger the exception in my running instance is:

www-data@7c2b2867fceb:~/html$ php occ files:scan --all

It takes a minute or two for the problem to occur, but so far it seems to happen every single time.

@szaimen
Copy link
Contributor

szaimen commented Jun 29, 2021

How many files do you have on your external storages and how many Nextcloud users that have access to those external storages?

@danielschemmel
Copy link

There are many files but only a few users with access

@szaimen
Copy link
Contributor

szaimen commented Jun 29, 2021

How many is many (approx.)?

@danielschemmel
Copy link

danielschemmel commented Jun 29, 2021

I should have expected that question: Roughly a million files distributed over some 65k folders. Number of users is <10.

@szaimen
Copy link
Contributor

szaimen commented Jun 29, 2021

Hm... that doesn't sound unreasonable, should be actually handleable.

@szaimen
Copy link
Contributor

szaimen commented Jun 29, 2021

cc @icewind1991

@ghost
Copy link

ghost commented Jul 29, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Jul 29, 2021
@vijfhoek
Copy link
Contributor

vijfhoek commented Aug 1, 2021

Still a problem. I suspect a solution would be changing up

$query = $this->getQueryBuilder();
$query->delete('filecache')
->whereParentIn($parentIds);
$query->execute();
to delete files in batches of, say, 50,000 instead of all at the same time.

A workaround would be to recreate a few empty folders in the data directory with the names of the folders in the root of the deleted file, and then calling files:scan again. This will cause nextcloud to do one query per folder instead of all folders at the same time.

@ghost ghost removed the stale Ticket or PR with no recent activity label Aug 1, 2021
@szaimen
Copy link
Contributor

szaimen commented Aug 8, 2021

Do you mind creating a PR with a patch for discussion?
Thank you!

@vijfhoek
Copy link
Contributor

I'm currently not able to, but I'll make one when I'm available in about a week

@ghost
Copy link

ghost commented Sep 13, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Sep 13, 2021
@ghost ghost closed this as completed Sep 27, 2021
@priyankub
Copy link

Could this be reopened? The issue still exists.

@szaimen szaimen reopened this Oct 16, 2021
@ghost ghost removed the stale Ticket or PR with no recent activity label Oct 16, 2021
@szaimen
Copy link
Contributor

szaimen commented Oct 16, 2021

@vijfhoek any update here? :)

@priyankub
Copy link

I have Samba storages connected to NC. There were large changes in the files in the storage from clients outside NC. So when NC reconciled everything, it had to delete a huge chunk which likely was giving this error.
I queried oc_storages to find out the storage IDs for the SMB shares, and deleted all entries from oc_filecache for the SMB shares. The error does not appear anymore and I can view, delete files in those SMB shares from NC without any issues.

@vijfhoek
Copy link
Contributor

@szaimen I must admit that this issue kind of ended up on the backburner here 😅

I've just implemented the fix I suggested, currently trying to reproduce the issue again so I can confirm it indeed fixes the issue.

@vijfhoek
Copy link
Contributor

vijfhoek commented Oct 17, 2021

I managed to reproduce the issue, and confirmed my proposed fix fixes the issue.

I have also done some research on what would be a good limit, based on the maximum number of parameters in a query:

  • sqlite: 32766 since 3.32.3
  • postgres: 65535
  • mysql: Only limited by packet size
  • mssql: Some sources say 2100, but I'm not entirely positive - the official docs only mention the limit for functions and stored procedures.

Interestingly, during some very unscientific testing I've found that a parameter count to 2048 has a significantly better performance on postgresql (2:58 min for the full scan) versus 32768 (3:07 min). This could be fully attributed to some variable (disk cache, background processes, whatever) but at least it means it isn't a major performance hit :)

I'll submit a pull request in a bit!

@szaimen szaimen added 2. developing Work in progress feature: occ and removed needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Oct 17, 2021
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: occ
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants