Chunked files are not deleted after failed uploads

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, 12.0.2): Nextcloud 14.0.3
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04.1 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29
PHP version (eg, 7.1): 7.2 as apache module
Storage: AWS S3 as primary storage
Database: AWS RDS (mysql)
Redis: AWS Elasticache

The issue you are facing:
Sometimes when uploading big files (8,1 GB) with the WebGUI the upload just stops without any error messages in apache error.log, access.log or nextcloud.log.
The file does not show in the Nextcloud WebGUI.
The main problem is that the chunks of these files are not deleted after the failed upload so that I have 45 GB in my S3 although it should be something about 25 GB.
After looking into the oc_filecache table i see that there are a lot of entries from these chunks so I tried to delete the chunks in the S3 and do an occ files:scan and occ files:cleanup without success. There were no changes after execution.

My database entries show this path for the chunks in S3:
uploads/web-file-upload-2a4b740a18dbb6f38eb25ecbf63960fc-1540362470950/8346664960
And there were hundreds of these. Every file has 10MB size.

Cron does execute every 15 minutes successfully.

The problem persists since version 13.0.6.

I already tried this: Old chunk files in cache folder (as mentioned above it does not work, the database entries persisted)

and this: https://github.com/nextcloud/server/issues/8753 does not work too. The oldest chunks are 5 days old.

Thank you for any hints and suggestions!

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

Steps to replicate it:

  1. Upload a file
  2. Let it fail

The output of your Nextcloud log in Admin > Logging:

Nothing

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

<?php
$CONFIG = array (
  'instanceid' => '<id>',
  'objectstore' =>
  array (
    'class' => 'OC\\Files\\ObjectStore\\S3',
    'arguments' =>
    array (
      'bucket' => '<name of s3 bucket>',
      'autocreate' => false,
      'key' => '<Access Key>',
      'secret' => '<Secret Key>',
      'use_ssl' => true,
      'region' => 'eu-central-1',
      'use_path_style' => false,
    ),
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '<name of redis server>',
    'port' => 6379,
    'timeout' => 0.0,
  ),
  'overwrite.cli.url' => '<url of nextcloud>',
  'htaccess.RewriteBase' => '/nextcloud',
  'passwordsalt' => 'dXWUQwVKWBEI8WrtexKfS0NQcdCo/C',
  'secret' => 'X5HQcopLMvWt00JIs/JoEHUNJSyceT/+OJIL1f382dk8R0px',
  'trusted_domains' =>
  array (
    0 => '<trusted domain>',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'skeletondirectory' => '/skeletondirectory',
  'dbtype' => 'mysql',
  'version' => '14.0.3.0',
  'dbname' => 'nextcloud',
  'dbhost' => '<db name>',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_administrator',
  'dbpassword' => 'umMtqEll2RFQVHm96nys/VAHE0Eitq',
  'installed' => true,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'email-smtp.eu-west-1.amazonaws.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_from_address' => 'nextcloud',
  'mail_domain' => '<mail domain>',
  'mail_smtpname' => '<access key>',
  'mail_smtppassword' => '<secret key>,
  'theme' => '',
  'loglevel' => 2,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'updater.release.channel' => 'stable',
  'updater.secret' => '$2y$10$c8NIuFSJFERqWRMSzyvNNuS8ZZMFchZJyPLv.XweiC6y86BPGAjwC',
);

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

Nothing
1 Like