Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with big files (over 2GB) #101

Closed
ObfuscateTheWeb opened this issue Aug 11, 2017 · 18 comments
Closed

Errors with big files (over 2GB) #101

ObfuscateTheWeb opened this issue Aug 11, 2017 · 18 comments
Assignees
Labels

Comments

@ObfuscateTheWeb
Copy link

ObfuscateTheWeb commented Aug 11, 2017

I've done nc-format-USB nc-datadir and nc-automount via the web interface.

I have an external 1TB usb storage and I test it by uploading big files to it.

First upload was 25.9 GB then it won't allow me to upload anymore.

It will give me a Request Entity Too Large error.

I then try setting the MAXFILESIZE in nc-limits to 50G

Reboot and still doesn't work.

At this point, I'm pretty sure I didn't set it up correctly because my full 1TB of storage isn't being used.
How do I set it up correctly? I did not modify anything in fstab.

EDIT: Don't want to open too many issues, so I'll add this here too.
I noticed that videos don't play in the web interface, I could hear audio but video is black.
I'm pretty sure it's a bug in the code somewhere, how do I manually fix it?
Which line of code to modify and what code to add?

@nachoparker nachoparker self-assigned this Aug 11, 2017
@nachoparker
Copy link
Member

There is a limit of 2G filesize, this is because Raspbian is 32 bit and PHP sucks. This has been worked around in Nextcloud 13, and the limitation will no longer exist.

It doesn't matter what you setup, if it's bigger than 2GB it will fail.

You can check df -h to see disk usage

You can check from the terminal that your files are indeed in the external drive ( maybe /media/USBdrive/ncdata/admin/files )

wrt the video issue... must be related to upstream nextcloud or your browser / OS. You will have to look that up

@ObfuscateTheWeb
Copy link
Author

Turns out, modsecurity was causing the issue !
Disabled it and it now works.

Only 2G? That doesn't sound right @nachoparker because my first upload was a full 25.9 GB (the entire breaking bad series)
The second upload was a windows iso file that was 3.27GB and it uploaded just fine..?

Just checked with df -h indeed, my external drive at /dev/sda1 mounted at /dev/USBdrive is at 26GB usage out of 1TB..

I can't find nextcloud 13 by searching, not even a new branch or something in github to indicate the existence of nextcloud 13, can you link me to it so I could read on the changes, features, etc?

@ObfuscateTheWeb
Copy link
Author

Okay.. I was wrong, my windows iso (3.27 GB) didn't upload. And thinking about it, I think the only reason I was able to upload 25.9 GB of breaking bad was because each episode was less than 2GB, the total size doesn't matter, what matters is the size per file.

In the case of the windows iso, it was a single file that was more than 2GBs, that's why it failed.

Am I right on this?

@nachoparker
Copy link
Member

100%

8^)

@ObfuscateTheWeb
Copy link
Author

ObfuscateTheWeb commented Aug 12, 2017

Just wondering, when will the upload size/file size limit be fixed? Like, a new PHP version that addresses this issue?

This seems to be a big problem in our digital world, I mean everything is data, and being able to handle files and folders of any size, no matter how large, should be common and doesn't need to be a hassle..

Why hasn't this been fixed? PHP, apache developers should be able to address this, but as of now, nothing has come of it...

@nachoparker
Copy link
Member

Yeah, it's pretty damn ridiculous. The PHP developers decided they won't fix it, which is incredible. It only affects 32 bits.

Like I said, there is a workaround for it, but we will have to wait until NC 13, which is under development.

If you don't want to wait and you can code, you can patch it yourself

nextcloud/server#1707 (comment)

@nachoparker nachoparker changed the title How do I know if external storage works? Errors with big files (over 2GB) Aug 12, 2017
@nachoparker
Copy link
Member

For the time being, you can also upload those files via samba/nfs/ssh

https://ownyourbits.com/2017/04/18/different-ways-to-access-your-nextcloud-files/

@ObfuscateTheWeb
Copy link
Author

well, pi has 64 bit processor but 32-bit raspbian, waste of hardward..lol

@ObfuscateTheWeb
Copy link
Author

Well, read through the post, well it ain't easy because it needs "deep refactoring of PHP"

The devs got their reasons I guess, can't blame em..

@nachoparker
Copy link
Member

nachoparker commented Aug 12, 2017

well, pi has 64 bit processor but 32-bit raspbian, waste of hardward..lol

Yeah, there are a couple reasons. One being compatibility with RPi2, another being they don't have the resources. HW is not much wasted because it doesn't have a lot of RAM anyways. Things should just work, this is mainly a SW problem.

The devs got their reasons I guess, can't blame em..

If you aim at having a 'web language' that can't cope with stuff >2GB... that's pretty bad. PHP receives a lot of criticism and these things don't help

@ObfuscateTheWeb
Copy link
Author

ObfuscateTheWeb commented Aug 12, 2017

Hmm, can't you just install a 64-bit linux on the pi and then get some 64-bit nextcloudpi and the problem of file sizes would be solved?

EDIT: Might be an interesting read

Until nextcloud 13 comes out, I'll just have to break down my files into smaller chunks and then put them together to make one complete file, haven't tested it, but theoretically it should work

@nachoparker
Copy link
Member

thanks for the link. I read it. It won't happen any soon, it seems. Literally, it seems like the Raspbian devs are a 2 men army, so they can't afford supporting both versions.

Probably easier to wait for NC13 or manually change the files and apply the patch for the workaround.

I chose Raspbian because it is debian based and it's popular. If I have a 64 bit OS then I lose support for RPi2, which is 32 bit. If we go for the Rock64 though, we might use some Debian 64 bit OS in the future.

I still recommend that you use samba/nfs/ssh for the big files. NCP is ready to use them

@ObfuscateTheWeb
Copy link
Author

ObfuscateTheWeb commented Aug 12, 2017

Then ditch everyone who is using a pi 2 ! Lol..

force all users to go out and get a pi 3 model b

@ghost
Copy link

ghost commented Aug 12, 2017 via email

@ObfuscateTheWeb
Copy link
Author

What was once a total of of a few hundred gigs now totals under 50.

That's interesting @Shadowstreik how did you manage to compress that much data? A few hundred gigs down to under 50?! That's some crazy compression..

Mind sharing your method of compression?

Handbrake did all of the conversions.
What's the point of filetype consistency? Does it somehow reduce file size and furthers compression?

@ghost
Copy link

ghost commented Aug 12, 2017 via email

@nachoparker
Copy link
Member

Then ditch everyone who is using a pi 2 ! Lol..
force all users to go out and get a pi 3 model b

Haha, not my decision though, but Raspbian developers

@delfer
Copy link

delfer commented Oct 24, 2019

Fixed by docker-library/php#901
Tested in Docker image nextcloud:17-apache (nextcloud@sha256:58836d449406b396c1c119c2661577fd7d8284ff41a7d181a0e2be232d2757fc, 2019-10-24T05:04:49.946856094Z)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants