Uploading Files bigger the 64M

Uploading Files bigger the 64M

am 25.01.2011 19:23:45 von hibbard

--_000_C9647F6120F4hibbardohioedu_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I am having all sorts of troubles uploading files bigger then 64M using mod=
_perl2.

Any file I try to upload that is bigger then 63M I get the following error.

(20014)Internal error: Content-Length header (723283299) exceeds configured=
max_body limit (67108864)

So I told myself lets do a little research .... It is Perl so this should b=
e easy to fix. After a little of researching I found the APREQ2_ReadLimit =
parameter for the httpd.conf. So I added this to my httpd.conf.

APREQ2_ReadLimit 1024M (1 Gig)

Restarted Apache and tried again .... Still no luck with same error message=
.. Back to researching.

I found 2 more things which I thought would solve my problem. I found POST=
_MAX:

my $req =3D Apache2::Request->new($r,POST_MAX =3D>100 * 1024 * 1024);

And also

$req->read_limit(100 * 1024 * 1024);

So I tried playing with these settings and all I get now is "Conflicting in=
formation" in my log files. As soon as I set POST_MAX or read_limit to any=
thing below 67108864 it works fine for all files less then 64M in size. Ho=
w can I get mod_perl2 to upload a 700mb file. If you need sample code of w=
hat I am doing I am more then happy to provide it.

Thanks in advance,

Tim Hibbard
Senior Program Engineer
Ohio University
Athens, Ohio 457-1

--_000_C9647F6120F4hibbardohioedu_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Uploading Files bigger the 64M


11pt'>I am having all sorts of troubles uploading files bigger then 64M usi=
ng mod_perl2.



Any file I try to upload that is bigger then 63M I get the following error.=




(20014)Internal error: Content-Length header (723283299) exceeds configured=
max_body limit (67108864)



So I told myself lets do a little research .... It is Perl so this should b=
e easy to fix.  After a little of researching I found the
T> font-size:9pt'>APREQ2_ReadLimit parameter for the httpd.conf.  So I ad=
ded this to my httpd.conf.



APREQ2_ReadLimit 1024M (1 Gig)



Restarted Apache and tried again .... Still no luck with same error message=
..  Back to researching.



I found 2 more things which I thought would solve my problem.  I found=
POST_MAX:



my $req =3D A=
pache2::Request->new( D1">$r,POST_MAX =3D>100 * 1024 * 1024);



And also



$req->read_limit(100 * 1024 * 1024);



So I tried playing with these settings and all I get now is “Conflict=
ing information” in my log files.  As soon as I set POST_MAX or =
read_limit to anything below
rdana, Helvetica, Arial">67108864 it works f=
ine for all files less then 64M in size.  How can I get mod_perl2 to u=
pload a 700mb file.  If you need sample code of what I am doing I am m=
ore then happy to provide it.



Thanks in advance,



Tim Hibbard

Senior Program Engineer

Ohio University

Athens, Ohio 457-1





--_000_C9647F6120F4hibbardohioedu_--

Re: Uploading Files bigger the 64M

am 25.01.2011 19:31:06 von Joe Schaefer

--0-109997068-1295980266=:30338
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

It's a bug in the merge code for mod_apreq2. Basically=0Ayou have to set A=
PREQ_ReadLimit to its max value=0Ain the main server's context (not in a vh=
ost or Location=0Aor Directory config). Otherwise use the code in apre=
q's trunk. >=0A>From: "Hibbard, Timothy" =0A>T=
o: "modperl@perl.apache.org" =0A>Sent: Tue, Januar=
y 25, 2011 1:23:45 PM=0A>Subject: Uploading Files bigger the 64M=0A>=0A>Upl=
oading Files bigger the 64M I am having all sorts of troubles uploading fil=
es =0A>bigger then 64M using mod_perl2.=0A>=0A>Any file I try to upload tha=
t is bigger then 63M I get the following error.=0A>=0A>(20014)Internal erro=
r: Content-Length header (723283299) exceeds configured =0A>max_body limit =
(67108864)=0A>=0A>So I told myself lets do a little research .... It is Per=
l so this should be =0A>easy to fix. After a little of researching I found=
the APREQ2_ReadLimit =0A>parameter for the httpd.conf. So I added this to=
my httpd.conf.=0A>=0A>APREQ2_ReadLimit 1024M (1 Gig)=0A>=0A>Restarted Apac=
he and tried again .... Still no luck with same error message. =0A> Back to=
researching.=0A>=0A>I found 2 more things which I thought would solve my p=
roblem. I found =0APOST_MAX:=0A>=0A>my $req =3D Apache2::Request->new($r,P=
OST_MAX =3D>100 * 1024 * 1024);=0A>=0A>And also=0A>=0A>$req->read_limit(100=
* 1024 * 1024);=0A>=0A>So I tried playing with these settings and all I ge=
t now is â€=9CConflicting =0A>informationâ€=9D in my log files. As=
soon as I set POST_MAX or read_limit to =0A>anything below 67108864 it wor=
ks fine for all files less then 64M in size. How =0A>can I get mod_perl2 t=
o upload a 700mb file. If you need sample code of what I =0A>am doing I am=
more then happy to provide it.=0A>=0A>Thanks in advance,=0A>=0A>Tim Hibbar=
d=0A>Senior Program Engineer=0A>Ohio University=0A>Athens, Ohio 457-1 =0A=

--0-109997068-1295980266=:30338
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

ad>

-size:12pt">
It's a bug in the merge code for mod_apreq2.  Basical=
ly
you have to set APREQ_ReadLimit to its max value
in the main serve=
r's context (not in a vhost or Location
or Directory config).

Oth=
erwise use the code in apreq's trunk.

der-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"=
>
12pt;">
; font-size: 12pt;"> -weight: bold;">From: "Hibbard, Timothy" <hibbard@ohio.edu>=
;
To: "modperl@perl.apa=
che.org" <modperl@perl.apache.org>
bold;">Sent: Tue, January 25, 2011 1:23:45 PM
=3D"font-weight: bold;">Subject: Uploading Files bigger the 64M<=
br>

<=
title>Uploading Files bigger the 64M ri, Verdana, Helvetica, Arial">I am having=
all sorts of troubles uploading files bigger then 64M using mod_perl2.
=
=0A
=0AAny file I try to upload that is bigger then 63M I get the follow=
ing error.
=0A
=0A(20014)Internal error: Content-Length header (72328=
3299) exceeds configured max_body limit (67108864)
=0A
=0ASo I told m=
yself lets do a little research .... It is Perl so this should be easy to f=
ix.  After a little of researching I found the
e=3D"1"> 9pt;">APREQ2_ReadLimit parameter for the httpd.conf.  So I added this =
to my httpd.conf.
=0A
=0AAPREQ2_ReadLimit 1024M (1 Gig)
=0A
=0A=
Restarted Apache and tried again .... Still no luck with same error message=
..  Back to researching.
=0A
=0AI found 2 more things which I tho=
ught would solve my problem.  I found POST_MAX:
=0A
=0A or=3D"#110094">my $req =3D Apache2::R=
equest->new($r ont>,POST_MAX =3D>100 * 1024 * 1024);
=0A
=0AAnd also
=0A
=
=0A$req->read_limit(100 * 1024 * 1024); r>=0A
=0ASo I tried playing with these settings and all I get now is =E2=
€œConflicting informationâ€=9D in my log files.  As soon as I =
set POST_MAX or read_limit to anything below
e=3D"Calibri, Verdana, Helvetica, Arial">6=
7108864 it works fine for all files less then 64M in size.  How can I =
get mod_perl2 to upload a 700mb file.  If you need sample code of what=
I am doing I am more then happy to provide it.
=0A
=0AThanks in adva=
nce,
=0A
=0ATim Hibbard
=0ASenior Program Engineer
=0AOhio Univ=
ersity
=0AAthens, Ohio 457-1
=0A refetch-control" content=3D"on">
=0A

=0A=
=0A
--0-109997068-1295980266=:30338--

Re: Uploading Files bigger the 64M

am 25.01.2011 19:46:56 von Ryan Gies

This is a multi-part message in MIME format.
--------------020907080401020908040900
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

1) You may lower the limit, not raise it. If you are trying to raise
it, you will get "Conflicting information".

2) Your server config trumps your virtual-host config. If you have not
set APREQ2_ReadLimit outside of your VirtualHost, then it is set for you
(64M).

Personally, I do this:

A) Set APREQ2_ReadLimit in /etc/httpd/conf.d/apreq.conf to the largest
value I would allow for any virtual host.

B) Set APREQ2_ReadLimit to the largest upload value appropriate for the
client inside their VirtualHost container.

C) Set $req->read_limit inside a PerlResponseHandler depending on the
logical type of request:

# The Apache request library only allows lowering the read limit
(POST_MAX).
# The default is 64M (64 * 1024 * 1024) so if larger uploads are
desired, one
# must raise the limit by setting APREQ2_ReadLimit in the Apache
configuration.
# When using VirtualHosts, the larger limit *must* be specified in
server
# configuration, and then optionally reduced in the vhost config.
# http://marc.info/?l=apreq-dev&m=115829354028472&w=2
my $limit = $req->read_limit();
my $max = $rr->max_post_size; # the max post size allowed for the
current request
if ($max > $limit) {
$Log->warn(sprintf('Cannot raise read_limit from %d to %d', $limit,
$max));
} else {
$req->read_limit($max) or die $!;
$limit = $req->read_limit();
$Log->error('Error setting read_limit') unless $limit == $max;
}



On 01/25/2011 01:23 PM, Hibbard, Timothy wrote:
> I am having all sorts of troubles uploading files bigger then 64M
> using mod_perl2.
>
> Any file I try to upload that is bigger then 63M I get the following
> error.
>
> (20014)Internal error: Content-Length header (723283299) exceeds
> configured max_body limit (67108864)
>
> So I told myself lets do a little research .... It is Perl so this
> should be easy to fix. After a little of researching I found the
> APREQ2_ReadLimit parameter for the httpd.conf. So I added this to my
> httpd.conf.
>
> APREQ2_ReadLimit 1024M (1 Gig)
>
> Restarted Apache and tried again .... Still no luck with same error
> message. Back to researching.
>
> I found 2 more things which I thought would solve my problem. I found
> POST_MAX:
>
> my $req = Apache2::Request->new($r,POST_MAX =>100 * 1024 * 1024);
>
> And also
>
> $req->read_limit(100 * 1024 * 1024);
>
> So I tried playing with these settings and all I get now is
> "Conflicting information" in my log files. As soon as I set POST_MAX
> or read_limit to anything below 67108864 it works fine for all files
> less then 64M in size. How can I get mod_perl2 to upload a 700mb
> file. If you need sample code of what I am doing I am more then happy
> to provide it.
>
> Thanks in advance,
>
> Tim Hibbard
> Senior Program Engineer
> Ohio University
> Athens, Ohio 457-1

--------------020907080401020908040900
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit




http-equiv="Content-Type">


1) You may lower the limit, not raise it.  If you are trying to
raise it, you will get "Conflicting information".



2) Your server config trumps your virtual-host config.  If you have not
set APREQ2_ReadLimit outside of your VirtualHost, then it is set for
you (64M).



Personally, I do this:



A) Set APREQ2_ReadLimit in /etc/httpd/conf.d/apreq.conf to the largest
value I would allow for any virtual host.



B) Set APREQ2_ReadLimit to the largest upload value appropriate for the
client inside their VirtualHost container.



C) Set $req->read_limit inside a PerlResponseHandler depending on
the logical type of request:



  # The Apache request library only allows lowering the read limit
(POST_MAX).

  # The default is 64M (64 * 1024 * 1024) so if larger uploads are
desired, one

  # must raise the limit by setting APREQ2_ReadLimit in the Apache
configuration.

  # When using VirtualHosts, the larger limit *must* be specified in
server

  # configuration, and then optionally reduced in the vhost config.

  #

  my $limit = $req->read_limit();

  my $max = $rr->max_post_size; # the max post size allowed for the
current request

  if ($max > $limit) {

    $Log->warn(sprintf('Cannot raise read_limit from %d to %d',
$limit, $max));

  } else {

    $req->read_limit($max) or die $!;

    $limit = $req->read_limit();

    $Log->error('Error setting read_limit') unless $limit == $max;

  }







On 01/25/2011 01:23 PM, Hibbard, Timothy wrote:


Uploading Files bigger the 64M
style="font-size: 11pt;">I am having all sorts of troubles uploading
files bigger then 64M using mod_perl2.



Any file I try to upload that is bigger then 63M I get the following
error.



(20014)Internal error: Content-Length header (723283299) exceeds
configured max_body limit (67108864)



So I told myself lets do a little research .... It is Perl so this
should be easy to fix.  After a little of researching I found the
size="1"> style="font-size: 9pt;">APREQ2_ReadLimit parameter for the httpd.conf.
 So I added this to my httpd.conf.



APREQ2_ReadLimit 1024M (1 Gig)



Restarted Apache and tried again .... Still no luck with same error
message.  Back to researching.



I found 2 more things which I thought would solve my problem.  I found
POST_MAX:



my $req =
Apache2::Request->new( color="#1800d1">$r
,POST_MAX =>100 * 1024 * 1024);



And also



$req->read_limit(100 * 1024 * 1024);



So I tried playing with these settings and all I get now is
“Conflicting information” in my log files.  As soon as I set POST_MAX
or read_limit to anything below
face="Calibri, Verdana, Helvetica, Arial"> style="font-size: 11pt;">67108864 it works fine for all files less
then 64M in size.  How can I get mod_perl2 to upload a 700mb file.  If
you need sample code of what I am doing I am more then happy to provide
it.



Thanks in advance,



Tim Hibbard

Senior Program Engineer

Ohio University

Athens, Ohio 457-1




--------------020907080401020908040900--

Re: Uploading Files bigger the 64M

am 25.01.2011 20:51:50 von hibbard

--_000_C964940620FEhibbardohioedu_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Worked like a charm. I had APREQ_ReadLimit in a vhost ... Once moving it o=
ut of the vhost I can now upload bigger files. Should have used the mailin=
g list before making an indentation in the brick wall with my forehead.

Many thanks!

Tim Hibbard


On 1/25/11 1:31 PM, "Joe Schaefer" wrote:

It's a bug in the merge code for mod_apreq2. Basically
you have to set APREQ_ReadLimit to its max value
in the main server's context (not in a vhost or Location
or Directory config).

Otherwise use the code in apreq's trunk.


From: "Hibbard, Timothy"
To: "modperl@perl.apache.org"
Sent: Tue, January 25, 2011 1:23:45 PM
Subject: Uploading Files bigger the 64M

Uploading Files bigger the 64M I am having all sorts of troubles uploading =
files bigger then 64M using mod_perl2.

Any file I try to upload that is bigger then 63M I get the following error.

(20014)Internal error: Content-Length header (723283299) exceeds configured=
max_body limit (67108864)

So I told myself lets do a little research .... It is Perl so this should b=
e easy to fix. After a little of researching I found the APREQ2_ReadLimit =
parameter for the httpd.conf. So I added this to my httpd.conf.

APREQ2_ReadLimit 1024M (1 Gig)

Restarted Apache and tried again .... Still no luck with same error message=
.. Back to researching.

I found 2 more things which I thought would solve my problem. I found POST=
_MAX:

my $req =3D Apache2::Request->new($r,POST_MAX =3D>100 * 1024 * 1024);

And also

$req->read_limit(100 * 1024 * 1024);

So I tried playing with these settings and all I get now is "Conflicting in=
formation" in my log files. As soon as I set POST_MAX or read_limit to any=
thing below 67108864 it works fine for all files less then 64M in size. Ho=
w can I get mod_perl2 to upload a 700mb file. If you need sample code of w=
hat I am doing I am more then happy to provide it.

Thanks in advance,

Tim Hibbard
Senior Program Engineer
Ohio University
Athens, Ohio 457-1



--_000_C964940620FEhibbardohioedu_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Re: Uploading Files bigger the 64M


11pt'>Worked like a charm.  I had APREQ_ReadLimit in a vhost ... Once =
moving it out of the vhost I can now upload bigger files.  Should have=
used the mailing list before making an indentation in the brick wall with =
my forehead.



Many thanks!



Tim Hibbard





On 1/25/11 1:31 PM, "Joe Schaefer" < hoo.com">joe_schaefer@yahoo.com> wrote:



=3D'font-size:12pt'>It's a bug in the merge code for mod_apreq2.  Basi=
cally

you have to set APREQ_ReadLimit to its max value

in the main server's context (not in a vhost or Location

or Directory config).



Otherwise use the code in apreq's trunk.



=3D'font-size:12pt'>

=3D'font-size:11pt'>From: &quo=
t;Hibbard, Timothy" <hibbard@ohio.edu<=
/a>>

To: "
modperl@perl.apache.or=
g
" <modperl@perl.apache.org=
>

Sent: Tue, January 25, 2011 1:23:45 PM

Subject: Uploading Files bigger the 64M

>

Uploading Files bigger the 64M
, Helvetica, Arial">I am having all sorts of=
troubles uploading files bigger then 64M using mod_perl2.



Any file I try to upload that is bigger then 63M I get the following error.=




(20014)Internal error: Content-Length header (723283299) exceeds configured=
max_body limit (67108864)



So I told myself lets do a little research .... It is Perl so this should b=
e easy to fix.  After a little of researching I found the
T> font-size:9pt'>APREQ2_ReadLimit parameter for the httpd.conf.  So I ad=
ded this to my httpd.conf.



APREQ2_ReadLimit 1024M (1 Gig)



Restarted Apache and tried again .... Still no luck with same error message=
..  Back to researching.



I found 2 more things which I thought would solve my problem.  I found=
POST_MAX:



my $req =3D A=
pache2::Request->new( D1">$r,POST_MAX =3D>100 * 1024 * 1024);



And also



$req->read_limit(100 * 1024 * 1024);



So I tried playing with these settings and all I get now is “Conflict=
ing information” in my log files.  As soon as I set POST_MAX or =
read_limit to anything below
rdana, Helvetica, Arial">67108864 it works f=
ine for all files less then 64M in size.  How can I get mod_perl2 to u=
pload a 700mb file.  If you need sample code of what I am doing I am m=
ore then happy to provide it.



Thanks in advance,



Tim Hibbard

Senior Program Engineer

Ohio University

Athens, Ohio 457-1
=3D'font-size:12pt'>

">

 






--_000_C964940620FEhibbardohioedu_--