Large File Download not working properly

Nextcloud version (eg, 12.0.2): 17.0.1
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.0.4
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.1): 7.3-fpm

Use Case : a 1.3GB video file in a directory. Wanting to download the file from the WebUI, I select download. My webpage gets in pending mode (nothing happens, but the tab header is “charging”).
On the server the cpu usage oscilates between 25 and 45% (mostly 29%), from what I beleive is the creation of a zip file.
However this process took an entire 20 minutes to complete !
And I eventually did receive the file but it was not ziped !
The single file came as is, which is fine, but the delay sounds incredibly unreasonnable.

The same process for a 20MB folder downloaded as a zipped file is almost instantaneous.

The server is running on a Dell with Intel® Core™ i3-2120 CPU @ 3.30GHz, and 16GB ram.

Something is not right. How may I go about finetuning this issue ?

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

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'xxx',
  ),
  'datadirectory' => 'xxx',
  'dbtype' => 'mysql',
  'version' => '17.0.1.1',
  'overwrite.cli.url' => 'xxx',
  'dbname' => 'xxx',
  'dbhost' => 'xxx',
  'dbport' => '',
  'dbtableprefix' => 'xxx',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'maintenance' => false,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
   10 => 'OC\\Preview\\TIFF',
  ),
  'filesystem_check_changes' => 0,
  'filelocking.enabled' => 'true',
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => false,
  'logfile' => 'xxx',
  'loglevel' => 2,
  'logtimezone' => 'xxx',
  'log_rotate_size' => 104857600,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwriteprotocol' => 'https',
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'quota_include_external_storage' => false,
  'share_folder' => '/Shares',
  'skeletondirectory' => '',
  'theme' => '',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'mysql.utf8mb4' => true,
);

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

In the apache2/error.log I get some
[date time] [proxy_fcgi:error] [pid 1369:tid 140241204463360] [client xxx:58436] AH01079: failed to make connection to backend: httpd-UDS
[adte time] [proxy:error] [pid 1369:tid 140241204463360] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed

 
In the php7.3-fpm.log I get some
[date time] NOTICE: [pool www] child 1897 exited with code 0 after 4234.346932 seconds from start


I’m thinking about some sort of issue with proxy configuration of apache or php, but can’t put my finger on it…

No suggestions ? Anyone ? :slight_smile: