Error when delete a bunch of files on S3 Storage (S3 is not the primary Storage)

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.3
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
PHP version (eg, 7.4): 7.4.28

The issue you are facing:
I try S3 External Storage (not as primary) for the first time. It works well, but when i delete a bunch of bigger files (each ~25MB) i get the message “Error delting file xxxxxxxx”.
It seams that the error occours because the deleted files (from S3) will be moved to trashbin (local storage). Can this be the problem?
When i delete only one file i dont get the error message.
I don´t find something to disable trashbin for the S3 Storage only.

When i delete the whole folder with the files it takes some time, but no error message.

Any ideas?

Regards, Heiko

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

Steps to replicate it:

  1. Add S3 Storage
  2. Upload 20 files with 20MB size to S3
  3. Delete all files at once. / Error occurs

nextcloud.log (Installation comes from an old owncloud thats why the path contains owncloud):

Error: Trying to access array offset on value of type bool at /var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Encryption.php#441
/var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 441:
OC\Log\ErrorHandler::onError(8, “Trying to a … l”, “/var/www/ht … p”, 441, { 0: “And 10 … l})
/var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 301:
OC\Files\Storage\Wrapper\Encryption->fopen(“Zeitschrift … f”, “r”)
/var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 794:
OC\Files\Storage\Wrapper\Wrapper->fopen(“Zeitschrift … f”, “r”)
/var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 651:
OC\Files\Storage\Wrapper\Encryption->copyBetweenStorage(OCA\Files_Tr … }}, “Zeitschrift … f”, “files_trash … 6”, true, true)
/var/www/html/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 595:
OC\Files\Storage\Wrapper\Encryption->moveFromStorage(OCA\Files_Tr … }}, “Zeitschrift … f”, “files_trash … 6”)
/var/www/html/owncloud/apps/files_trashbin/lib/Storage.php - line 239:
OC\Files\Storage\Wrapper\Wrapper->moveFromStorage(OCA\Files_Tr … }}, “Zeitschrift … f”, “files_trash … 6”)
/var/www/html/owncloud/apps/files_trashbin/lib/Trashbin.php - line 322:
OCA\Files_Trashbin\Storage->moveFromStorage(OCA\Files_Tr … }}, “Zeitschrift … f”, “files_trash … 6”)
/var/www/html/owncloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php - line 107:
OCA\Files_Trashbin\Trashbin::move2trash(“ContaboS3/Z … f”)
/var/www/html/owncloud/apps/files_trashbin/lib/Trash/TrashManager.php - line 102:
OCA\Files_Trashbin\Trash\LegacyTrashBackend->moveToTrash(OCA\Files_Tr … }}, “Zeitschrift … f”)
/var/www/html/owncloud/apps/files_trashbin/lib/Storage.php - line 202:
OCA\Files_Trashbin\Trash\TrashManager->moveToTrash(OCA\Files_Tr … }}, “Zeitschrift … f”)
/var/www/html/owncloud/apps/files_trashbin/lib/Storage.php - line 102:
OCA\Files_Trashbin\Storage->doDelete(“Zeitschrift … f”, “unlink”)
/var/www/html/owncloud/lib/private/Files/View.php - line 1171:
OCA\Files_Trashbin\Storage->unlink(“Zeitschrift … f”)
/var/www/html/owncloud/lib/private/Files/View.php - line 728:
OC\Files\View->basicOperation(“unlink”, “/ContaboS3/ … f”, [ “delete”])
/var/www/html/owncloud/apps/dav/lib/Connector/Sabre/File.php - line 495:
OC\Files\View->unlink(”/ContaboS3/ … f")
/var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 179:
OCA\DAV\Connector\Sabre\File->delete()
/var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 281:
Sabre\DAV\Tree->delete(“files/heiko … f”)
/var/www/html/owncloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:
Sabre\DAV\CorePlugin->httpDelete(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
/var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:
Sabre\DAV\Server->emit(“method:DELETE”, [ Sabre\HTTP … }])
/var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
/var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:
Sabre\DAV\Server->start()
/var/www/html/owncloud/apps/dav/lib/Server.php - line 339:
Sabre\DAV\Server->exec()
/var/www/html/owncloud/apps/dav/appinfo/v2/remote.php - line 35:
OCA\DAV\Server->exec()
/var/www/html/owncloud/remote.php - line 166:
require_once("/var/www/ht … p")