Cannot download large folders (>1.5GB)

Is there anyone else having this issue on NCP v. 0.64.11/Nextcloud 14.0.3.0?

I’m unable to download large folders. The limit seems to be around 1.5GB. Up to this size I get a zip file with the folder contents, but anything larger (or at least that seems to be the problem) generates an Internal Server Error, producing an entry in the log file similar to this:

{“reqId”:“W9aRC38AAQEAAAOmraMAAAcG”,“level”:3,“time”:“2018-10-29T04:48:11+00:00”,“remoteAddr”:“192.168.1.142”,“user”:“mcast”,“app”:“index”,“method”:“GET”,“url”:"/index.php/apps/files/ajax/download.php?dir=%2Fnas%2FSoftware&files=Office%20Pro%20Plus%20Windows&downloadStartSecret=yq2nunwg67f",“message”:{“Exception”:“TypeError”,“Message”:“Argument 2 passed to OC\Streamer::__construct() must be of the type integer, float given, called in /var/www/nextcloud/lib/private/legacy/files.php on line 166”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/private/legacy/files.php",“line”:166,“function”:"__construct",“class”:“OC\Streamer”,“type”:"->",“args”:[{“class”:“OC\AppFramework\Http\Request”},3548438562,89]},{“file”:"/var/www/nextcloud/apps/files/ajax/download.php",“line”:64,“function”:“get”,“class”:“OC_Files”,“type”:"::",“args”:["/nas/Software",“Office Pro Plus Windows”,{“head”:false}]},{“file”:"/var/www/nextcloud/lib/private/Route/Route.php",“line”:155,“args”:["/var/www/nextcloud/apps/files/ajax/download.php"],“function”:“require_once”},{“function”:“OC\Route\{closure}”,“class”:“OC\Route\Route”,“type”:"->",“args”:["*** sensitive parameters replaced ***"]},{“file”:"/var/www/nextcloud/lib/private/Route/Router.php",“line”:297,“function”:“call_user_func”,“args”:[{“class”:“Closure”},{"_route":“files_ajax_download”}]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:987,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/files/ajax/download.php"]},{“file”:"/var/www/nextcloud/index.php",“line”:42,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/var/www/nextcloud/lib/private/Streamer.php",“Line”:46,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0”,“version”:“14.0.3.0”}

You seem to be the only one having this issue, …
I run NCP v. 0.66.1/Nextcloud 14.0.3.0 also
Just to make sure I uploaded a 2.7Gb uncompressed imagefile and downloaded it again.
I checked md5sum of the two files and they are identical.
Took about 20 to 25 min to upload, and around 10 to download.


You may have hardware issue, what’s the status of your NCP now?

1 Like

Thanks for the response. I’ll install NCP in another machine to test.

I just noticed there’s no problem in downloading a large file at all. The problem is in downloading entire folders larger than 1.5GB.

What are the hardware specs and installation method you are using?
Big folders are automatically zipped into a single .zip file when I try to download a complete folder. Works fine here.
Maybe your server is not configured to do that.

I have the same issue with .mp4- files sizes starting from 520MB. Other files are working. I don’t know wether the file sizes matters:

{“reqId”:“PrGE9B8qSvJQBsPyDHFF”,“level”:3,“time”:“2018-11-05T18:01:12+00:00”,“remoteAddr”:“83.236.xxx.xxx”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/s/nacAidzAsbZLZQe/download",“message”:{“Exception”:“TypeError”,“Message”:“Argument 2 passed to OC\Streamer::__construct() must be of the type integer, float given, called in /var/www/nextcloud/lib/private/legacy/files.php on line 166”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/private/legacy/files.php",“line”:166,“function”:"__construct",“class”:“OC\Streamer”,“type”:"->",“args”:[{“class”:“OC\AppFramework\Http\Request”},14856528645,6]},{“file”:"/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php",“line”:550,“function”:“get”,“class”:“OC_Files”,“type”:"::",“args”:["/Medien/Fotos/2018/2018-11-04_Tanzevent",“Video_Mittelgang_erste_Haelfte”,{“head”:false}]},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:166,“function”:“downloadShare”,“class”:“OCA\Files_Sharing\Controller\ShareController”,“type”:"->",“args”:[“nacAidzAsbZLZQf”,null,"",""]},{“file”:"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",“line”:99,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Files_Sharing\Controller\ShareController”},“downloadShare”]},{“file”:"/var/www/nextcloud/lib/private/AppFramework/App.php",“line”:118,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Files_Sharing\Controller\ShareController”},“downloadShare”]},{“file”:"/var/www/nextcloud/lib/public/AppFramework/App.php",“line”:140,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“ShareController”,“downloadShare”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”}]},{“file”:"/var/www/nextcloud/core/routes.php",“line”:171,“function”:“dispatch”,“class”:“OCP\AppFramework\App”,“type”:"->",“args”:[“ShareController”,“downloadShare”]},{“function”:"{closure}",“class”:“OC\Route\Router”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/lib/private/Route/Router.php",“line”:297,“function”:“call_user_func”,“args”:[{“class”:“Closure”}," sensitive parameter replaced ***"]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:987,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/s/nacAidzAsbZLZQf/download"]},{“file”:"/var/www/nextcloud/index.php",“line”:42,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/var/www/nextcloud/lib/private/Streamer.php",“Line”:46,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0”,“version”:“14.0.3.0”}

Having the same problem on 14.0.3 on Raspbian.

The problem is not explicitly with folders of a certain size, as I can successfully download >20GB folders. Also no problem with .mp4 files specifically, as I can download single files of any size.

It could be related to the amount of files in a folder. I haven’t done much testing yet, but folders containing many (10 plus) .mkv or .mp4 have failed to download, while folders containing a single 20-40 GB .mkv with 4-5 .jpg files will zip and download fine.

I get redirected to an internal server error page.

It should be mentioned that all downloads I tried (successful and not) were from a samba share on my home network added as an external storage in nextcloud.

Error message in log is similar to yours:

Argument 2 passed to OC\Streamer::__construct() must be of the type integer, float given, called in … /nextcloud/lib/private/legacy/files.php on line 166

EDIT to add:
Quick practical test: from a folder containing 27 .mkv files, I can mark and simultaneously download 23 files, but not more. In a folder with 12 .avi files I could mark and download 11, but no all 12. When the cumulative file size reaches 2GB it stops working. Could be related to 32 bit PHP, as I remember having problems getting files >2GB to stream when sharing by WebDAV.

EDIT2:
Actually I’m not sure about downloading the >20GB files. The downloads start, but there’s no total file size, because the file size hasn’t been indexed by nextcloud.

I suggest you look in the nextcloud server github issue tracker, see if somebody else also noticed this

I’m using the latest NextCloudPi on a Raspberry Pi 3+

I tried installing on a separate Raspberry Pi, and got the same error.

After investigating a little more I believe the problem is not the size of the folders, but the number of files and folders inside them. Probably some issue passing arguments to the “zip” app.

Hi guys! I have the same problem in a VPS running a 32-bit Debian Linux. I have created an issue in Github: https://github.com/nextcloud/server/issues/12422