Page 1 of 1

webserver and owncloud increase upload limit

Posted: 15 Dec 2012 00:27
by negreasrin
hello
i am new to forums ,i usually read and test
but i am stuck now .
please help
i need to increase the upload limit from owncloud ,current limit is 512m
i have tested on debian and the increase works,but debian uses apache
i have read and tested the following :

find / -name php.ini
/usr/local/etc/php.ini
edited php.ini but no luck
please help me to increase the limit to lighttpd and owncloud


thanks in advance

Re: webserver and owncloud increase upload limit

Posted: 15 Dec 2012 19:33
by jparaja
Hi, how did you find the php.ini file. do i use a word pad? i too would like to increase owncloud upload file size.

thanks

Re: webserver and owncloud increase upload limit

Posted: 15 Dec 2012 20:20
by daoyama
Hi,

Try to edit /usr/local/bin/php-cgi-websrv.

Daisuke Aoyama

Re: webserver and owncloud increase upload limit

Posted: 16 Dec 2012 01:37
by jparaja
Thanks daoyama, but where do i find /usr/local/bin, is it in owncloud directory? sorry to sound so newb.

Re: webserver and owncloud increase upload limit

Posted: 16 Dec 2012 08:55
by raulfg3
is in Nas4Free boot device.

use embeded file editor: Advanced|File Editor , locate file , and edit desired value, next, save it and restart NAS

Re: webserver and owncloud increase upload limit

Posted: 16 Dec 2012 19:26
by jparaja
Will this increase owncloud upload limit and what command do I use?

Re: webserver and owncloud increase upload limit

Posted: 16 Dec 2012 22:02
by jparaja
OK, i think i know where i messed up. i installed owncloud on one of my drives instead of the data directory /mnt/data. im reinstalling owncloud correctly now and will report back

Re: webserver and owncloud increase upload limit

Posted: 16 Dec 2012 23:13
by jparaja
I want to set the max to 20gig. do i input 20g?


#!/bin/sh

SESSION_NAME="WS_PHPSESSID"
MEMORY_LIMIT="512M"
UPLOAD_MAX="512M"
POST_MAX="512M"

UPLOADDIR="`cat /var/etc/websrv-uploaddir.conf`"
if [ -z "$UPLOADDIR" ]; then
UPLOADDIR="/var/tmp/ftmp"
fi

/usr/local/bin/php-cgi -d session.name="$SESSION_NAME" -d memory_limit="$MEMORY_LIMIT" -d upload_max_filesize="$UPLOAD_MAX" -d post_max_size="$POST_MAX" -d upload_tmp_dir="$UPLOADDIR" "$@"

Re: webserver and owncloud increase upload limit

Posted: 16 Dec 2012 23:27
by raulfg3
personally I think 20GBis too much, try 1 GB first, next try 4GB, keep in mind time necesary to upload 20GB using ADSL line ( asimetric).


example for 1GB

Code: Select all

#!/bin/sh

SESSION_NAME="WS_PHPSESSID"
MEMORY_LIMIT="1024M"
UPLOAD_MAX="1024M"
POST_MAX="1024M"

UPLOADDIR="`cat /var/etc/websrv-uploaddir.conf`"
if [ -z "$UPLOADDIR" ]; then
UPLOADDIR="/var/tmp/ftmp"
fi

/usr/local/bin/php-cgi -d session.name="$SESSION_NAME" -d memory_limit="$MEMORY_LIMIT" -d upload_max_filesize="$UPLOAD_MAX" -d post_max_size="$POST_MAX" -d upload_tmp_dir="$UPLOADDIR" "$@"
example for 4GB

Code: Select all

#!/bin/sh

SESSION_NAME="WS_PHPSESSID"
MEMORY_LIMIT="4096M"
UPLOAD_MAX="4096M"
POST_MAX="4096M"

UPLOADDIR="`cat /var/etc/websrv-uploaddir.conf`"
if [ -z "$UPLOADDIR" ]; then
UPLOADDIR="/var/tmp/ftmp"
fi

/usr/local/bin/php-cgi -d session.name="$SESSION_NAME" -d memory_limit="$MEMORY_LIMIT" -d upload_max_filesize="$UPLOAD_MAX" -d post_max_size="$POST_MAX" -d upload_tmp_dir="$UPLOADDIR" "$@"

PD: remenber that you can split file in several parts ( using winzip, or winRAR or etc...) so really no need to upload 20GB in one big file

Re: webserver and owncloud increase upload limit

Posted: 17 Dec 2012 00:37
by jparaja
Thank you raulfg3, It work perfectly. this is the first time i use the file editor in nas4free.

Re: webserver and owncloud increase upload limit

Posted: 17 Dec 2012 16:16
by negreasrin
daoyama wrote:Hi,

Try to edit /usr/local/bin/php-cgi-websrv.

Daisuke Aoyama

thanks a lot

always the developer can help.

worked like a charm
thanks

Re: webserver and owncloud increase upload limit

Posted: 17 Dec 2012 16:19
by negreasrin
jparaja wrote:Hi, how did you find the php.ini file. do i use a word pad? i too would like to increase owncloud upload file size.

thanks
to find use this command without quotes "find / -name php.ini" ,but editing this will Not increase your limit
to increase your limit follow Daisuke Aoyama post and use nas4free file editor

Re: webserver and owncloud increase upload limit

Posted: 17 Dec 2012 17:34
by jparaja
every time i set upload limit in file editor and save, it resets back to 512 after a reboot. how do i make it stick?

Re: webserver and owncloud increase upload limit

Posted: 17 Dec 2012 20:39
by raulfg3
jparaja wrote:every time i set upload limit in file editor and save, it resets back to 512 after a reboot. how do i make it stick?
probably you have an embeded install, easy way to have persistent is to have a full install.

You can save your config, do a new fresh full install and restore your config.

Now you cahanges are persistent.


PD: If you are worried about life of your USB, you can allways save logs on data disk to minimize writes on Flash disk ( search the forum , there are a lot of usefull info of how to do , and in wiki too).

Re: webserver and owncloud increase upload limit

Posted: 20 Dec 2012 02:47
by jparaja
Hi raulfg3, why can't I upload a 3gig file? My upload limit is 10gig

Re: webserver and owncloud increase upload limit

Posted: 20 Dec 2012 07:53
by raulfg3
What Filesystem do you use? ext2 have a 2GB limit

Re: webserver and owncloud increase upload limit

Posted: 20 Dec 2012 15:49
by jparaja
All drives formated to UFS

Re: webserver and owncloud increase upload limit

Posted: 20 Dec 2012 17:07
by raulfg3
jparaja wrote:Hi raulfg3, why can't I upload a 3gig file? My upload limit is 10gig
not sure, try , 2GB, 1GB , 512MB to determine what is the file size limit.

PD: revise your config to be sure that use data disk and not boot disk to store upload files.

Re: webserver and owncloud increase upload limit

Posted: 12 May 2013 20:21
by maxxximilian
jparaja wrote:Hi raulfg3, why can't I upload a 3gig file? My upload limit is 10gig
I have the same problem and I figured out that file size limit is 2GB. Upload limit is set to 12GB on php-cgi-websrv file. Filesystem is ZFS, Owncloud is installed to data storage (where I have many files over 2GB). Is there any way to fix this?

Btw, in NAS4Free web panel, Diagnostics, Log are errors like:
lighttpd[33244]: (request.c.1182) request-size too long: 2835343949 -> 413
lighttpd[18084]: (request.c.1182) request-size too long: 6920716363 -> 413

and so on.

Re: webserver and owncloud increase upload limit

Posted: 01 May 2014 04:05
by athena
maxxximilian wrote:
jparaja wrote:Hi raulfg3, why can't I upload a 3gig file? My upload limit is 10gig
I have the same problem and I figured out that file size limit is 2GB. Upload limit is set to 12GB on php-cgi-websrv file. Filesystem is ZFS, Owncloud is installed to data storage (where I have many files over 2GB). Is there any way to fix this?

Btw, in NAS4Free web panel, Diagnostics, Log are errors like:
lighttpd[33244]: (request.c.1182) request-size too long: 2835343949 -> 413
lighttpd[18084]: (request.c.1182) request-size too long: 6920716363 -> 413

and so on.
Did you end up finding out the issue? I am currently encountering the exact same problem.

Re: webserver and owncloud increase upload limit

Posted: 15 May 2014 08:54
by maxxximilian
No. I think it is Owncloud limitation.

Re: webserver and owncloud increase upload limit

Posted: 03 Jun 2014 21:38
by athena
I figured out how to upload files larger than 2GB after a lot of searching and head banging. I will share it in the hopes that it will help somebody.

In addition to the changes for php-cgi-websrv, you also need to change the websrv file in /etc/rc.d/
Open the websrv file change the following parameter:
server.max-request-size= 5243440000 # or whatever you want max file size to be (this would set it to 5GB)