core icon indicating copy to clipboard operation
core copied to clipboard

upload 10 GB file problem

Open ma-schmid opened this issue 11 years ago • 20 comments

Steps to reproduce

  1. create a file name file_10g on your laptop
  2. upload the file via web browser (firefox 38.0.5)

Expected behaviour

the file should be stored into the users home folder.

Actual behaviour

The file is fully transmitted to the "upload_tmp_dir“, but then, an error message in German "Fehler bei der Anmeldung") comes up in German, whereas the ownCloud language is set to English

A test with 1 GB file worked fine !

Server configuration

Operating system: SLES 12 Web server: apache 2.4 Database: Oracle RAC 11 PHP version: 5.5.14 ownCloud version: (see ownCloud admin page) 8.0.3 Updated from an older ownCloud or fresh install: updated from 7.0.5 some time ago List of activated apps: LDAP, The content of config/config.php: post_max_size = 48G max_input_time = 3600 max_execution_time = 3600 upload_tmp_dir = /data/tmp/ output_buffering = 4096

**Are you using external storage: NO

free space in upload_tmp_dir:

df -h /data

Filesystem Size Used Avail Use% Mounted on frda90032:/vol/nvar_frdv01637_frdv01638_01 2.0T 703M 2.0T 1% /data

Are you using encryption: yes/no NO Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... MS AD

LDAP configuration (delete this part if not used)

not available yet
run: sqlite3 data/owncloud.db
then execute:  select * from oc_appconfig where appid='user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser: Firefox 38.0.5 Operating system: Win 7

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

because enterprise prospect, will be stored on S3 iat ownCloud corporation

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

ma-schmid avatar Jun 17 '15 09:06 ma-schmid

@DeepDiver1975 @PVince81 Wasn't there a restriction in the upload size for WebUI (aka non chunked upload)

MorrisJobke avatar Jun 17 '15 09:06 MorrisJobke

@CaptionF Whats the setting of your upload_max_filesize? Have you also checked the other PHP and webserver settings like described here:

https://doc.owncloud.org/server/8.0/admin_manual/configuration_files/big_file_upload_configuration.html

ghost avatar Jun 17 '15 10:06 ghost

The file is fully transmitted to the "upload_tmp_dir“, but then, an error message in German "Fehler bei der Anmeldung") comes up in German, whereas the ownCloud language is set to English

how long does the upload take? you might run into time out issues.

@LukasReschke "Fehler bei der Anmeldung" :question: any idea? THX

DeepDiver1975 avatar Jun 17 '15 10:06 DeepDiver1975

upload_max_filesize = 48G post_max_size = 48G max_input_time = 3600 max_execution_time = 3600 upload_tmp_dir = /data/tmp/ output_buffering = 4096 session_lifetime=300

the prospect provided also:

Start upload: 09:15:00 Uhr error bei: 09:22:48 Uhr Client: 10.181.130.191 User: Z208263 Folder: large File: file_10g

@DeepDiver1975 The upload took longer then 5 min. Would that explain the issue? is the session not kept alive as long as an upload or download is performed?

ma-schmid avatar Jun 17 '15 10:06 ma-schmid

Hi,

output_buffering = 4096

quoting from the linked documentation above:

Output Buffering must be turned off in .htaccess or .user.ini or php.ini, or PHP will return memory-related errors:

output_buffering = 0

Unfortunately i have no idea if this is still valid but could be a starting point to set this accordingly to the available documentation.

ghost avatar Jun 17 '15 11:06 ghost

session_lifetime=300

:bomb:

@DeepDiver1975 The upload took longer then 5 min. Would that explain the issue?

Yes. That would explain the case.

is the session not kept alive as long as an upload or download is performed?

Yes. The session last use time is determined in PHP when the requests first hit the server (not while the upload runs). Thus this is at the beginning of the upload.

Besides increasing that timeout I don't see a lot of quick-win possibilities. Besides not uploading files that take longer to process via web as we don't use chunking there.

LukasReschke avatar Jun 17 '15 12:06 LukasReschke

Logs are also available: https://s3.owncloud.com/owncloud/index.php/apps/files/?dir=%2FShared%2Fowncloud%2Fsupport%2Fgithub-issues%2Fcore%2F16987

MorrisJobke avatar Jun 17 '15 13:06 MorrisJobke

Yes, but the logs do not really contain helpful information as far I could tell :smile:

LukasReschke avatar Jun 17 '15 13:06 LukasReschke

Yes, but the logs do not really contain helpful information as far I could tell :smile:

I just want to reference to them ;) Just in case ...

MorrisJobke avatar Jun 17 '15 13:06 MorrisJobke

Prospect confirms:

increasing the session_lifetime from 300 to a time that covers the upload time from a large file (10 GB) fixed the issue. I recommended to set it to 3600, so even file with 50 GB will work.

ma-schmid avatar Jun 17 '15 13:06 ma-schmid

Definitely something which should be documented: https://github.com/owncloud/documentation/issues/1223

ghost avatar Jun 17 '15 13:06 ghost

Definitely something to document: owncloud/documentation#1223

I would say "no". Or just document this as workaround for a known bug. Once we added proper file-chunking in the web UI (planned for 8.2 - #12353). Nothing we should recommend here.

MorrisJobke avatar Jun 17 '15 13:06 MorrisJobke

IF this file-chunking in the web UI is included in 8.2 the whole chapter needs an overhaul. :-)

ghost avatar Jun 17 '15 13:06 ghost

@RealRancor not necessarily. Even if we manage to add file chunking in the web UI, there will always be browsers that need the old approach ...

PVince81 avatar Jun 17 '15 13:06 PVince81

and then also the session_lifetime?

ghost avatar Jun 17 '15 13:06 ghost

@CaptionF Just a short question: There is no "session_lifetime" available in PHP 5.5 or 5.6. Have you raised "session.cookie_lifetime" instead?

ghost avatar Jun 18 '15 15:06 ghost

OwnCloud Config :)

LukasReschke avatar Jun 18 '15 19:06 LukasReschke

Arghhhs, and i was wondering why php.net didn't shown up that much infos about this. :see_no_evil:

ghost avatar Jun 18 '15 20:06 ghost

I also googled first... And I guess I was involved writing it like years ago :speak_no_evil:

LukasReschke avatar Jun 18 '15 20:06 LukasReschke

:grinning:

If its an ownCloud setting which is not included in the default setting them i'm really wondering if we even need to document this. The session_lifetime defaults to 15 days, the 300seconds configured by the OP is probably only an edge-case?

ghost avatar Jun 19 '15 07:06 ghost