andk / pause

Perl authors upload server
http://pause.perl.org/
150 stars 57 forks source link

raise max upload size #470

Closed rspier closed 4 months ago

rspier commented 4 months ago

nginx defaults to 1mb client_max_body_size which is very limiting for the large POSTs that PAUSE requires.

Raise to 250mb, which is a little larger than the largest files.

Note: an upload of a 200mb file failed, but in Plack/mojo, not nginx as before. An upload of 25mb (bigger than the average perl5 release) was fine.

charsbar commented 4 months ago

It might be better to set MOJO_MAX_MESSAGE_SIZE to an appropriate size, too (cf. https://metacpan.org/pod/Mojo::Message#max_message_size)

charsbar commented 4 months ago

Setting max_message_size doesn't seem to work for me. My local PAUSE accepts no matter how large a file is.

@rspier, do you remember what kind of failture you saw from Plack/mojo when you uploaded a 200mb file?

rspier commented 4 months ago

It was a giant mojo stack trace.

Today, I can't replicate it. (Yay?) I was just able to upload 200MB of null bytes.

wolfsage commented 4 months ago

This is actually controlled by this:

lib/pause_2017/PAUSE/Web.pm
14:  $app->max_request_size(0); # indefinite upload size
rspier commented 4 months ago

So my stack trace must have been a fluke.

rspier commented 4 months ago

The nginx change should be sufficient.