Upload Error: 413 Request Entity Too Large

I'm trying to upload a .w2p file through the web2py admin application and I'm getting a 413 error. I do not get this error when running web2py on my localhost. I also get this error when I try to upload a file to general locations for pythonanywhere. For these reasons I think this is an error being generated by pythonanywhere.

The file is only 61MB so it is well under both the free limit and thereby the web developer limit I've subscribed to. I regularly pack and unpack web2py applications in the web2py admin interface in order to develop offline and see this as a critical operation.

I didn't see any other forum posts regarding this so I would appreciate any insights into a solution that people might have.

I'm guessing this might require client_max_body_size changing in nginx, but I'm not sure what it's configured to currently.

However, there will probably need to be some limit set to prevent DoS attacks, so I guess it's a case of coming up with a reasonable value.

We're currently set to 20mb. I'll look into whether we can change it...

In the meantime, is there a way of using scp or Dropbox to get the app onto PythonAnywhere?

Oh go on then. Nothing's too much for our beloved paying users. We've just bumped the limit to 100mb. :-)

Let us know if it all works OK now.

I have a file that is 133.2 MB. I'm compressing/ZIPing it for upload...but an even higher limit would be nice :)

btw- as a paying user, you know you can scp/sftp/rsync it up right?

Hmm, why might I want to use that? I'm super new to all this. I took a grand total of 1 programming or computer science classes in college and grad school. My background is all scientific computing (MATLAB, Python, C, and even some Fortran!) that I learned bit by bit along the way...but I'm really glad that I learned Python, because it is omnipotent.


oh just that some people find it easier to setup a ftp client and move multiple files over that way, or sometimes others prefer the commandline etc. (and there is no 100mb limit)

My recent post asks about the same issue. I guess my app is way too big, because of the functionalities it has... Would you bump the limit again for me? My app is about 185MB..I would really appreciate it!! Thank you!!

I have tried uploading the w2p file through rsync, but after successfully uploading, i got the "invalid request" on my app webpage. I wonder if I got the <destination_directory> right... I tried both the source code directory and the working directory...

I think web2py needs applications installed in a specific directory, but I don't know which -- people on the web2py Google group will definitely be able to give you the answer, though.

Would you please just bump the limit for me so I can upload the 185MB w2p and run auto installation? I'm super new to this and so far I have no luck in finding a good solution to it... Thank you!!!

The limit isn't something we can change on a per-user basis -- it's site-wide, and changing it would open us up to hackers trying denial-of-service attacks.