ZipStreamer.php causes download problems

Hello there!

While downloading a larger zip-file (6.6 GB) from NC, the download stops saying “network error” and starts downloading from start again.

[Nextcloud Hub II], Version23.0.5
|Operating System:|Linux 5.10.0-13-amd64 x86_64|
|CPU:|Common KVM processor (4 cores)|
|Memory:|7.77 GB|
Error: Undefined index: HTTP_USER_AGENT at /var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php#159
GET /index.php/apps/files/ajax/download.php?dir=%2F&files=Parameter_Tuning&downloadStartSecret=blys6lqup3w
from 192.168.x.xxx by "user" at 2022-06-08T08:20:48+00:00

NC is behind a seperate reverse proxy (nginx). It allows handling files up to 10Gbyte.

I will post my config.php file ASAP.

From the admin-section about PHP:

Version: *7.4.28*
Memory Limit: *2 GB*
Max Execution Time: *3600*
Upload max size: *10 GB*

Database:

Type: *mysql*
Version: *10.5.15*

I’ve not yet updated to the next NC-Version since not all of my apps are compatible yet.

Could you please help me to find the problem and a solution?

Thank you.

1 Like

I have the same problem, when trying to download a large collection of files > 10G. The error that is being displayed in the nextcloud.log is the following:

{
  "reqId": "<REQUEST_ID>",
  "level": 3,
  "time": "2023-08-07T16:49:32+02:00",
  "remoteAddr": "<REMOTE_ADDR>",
  "user": "--",
  "app": "PHP",
  "method": "GET",
  "url": "<DOWNLOAD_URL>",
  "message": "ob_end_flush(): Failed to delete and flush buffer. No buffer to delete or flush at /var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php#171",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
  "version": "26.0.1.1",
  "data": {
    "app": "PHP"
  }
}