Upload file limit


#1

Gogs version: 0.11.29.0727
System: Linux Ubuntu 16.04
Database: SQLite3

I am trying to upload some files into my repository. They are about 50 MBs each. Gogs doesn’t let me upload anything larger than 3 MBs through the browser. However when committing changes and trying pushing I get the following error:
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
fatal: The remote end hung up unexpectedly
Then I tried using http://try.gogs.io in which I managed adding my file with no errors. Where is the limit set and how can I change it? I am using gogs’ docker image if that makes any difference. Thanks!


#2

Update:
After studying the settings file a bit, I noticed I need to add some sections to my app.ini in gogs/data/conf. So these are the sections I added:

[attachment]
MAX_SIZE = 50

[release.attachment]
MAX_SIZE = 50

[repository.upload]
MAX_SIZE = 50

Unfortunately though, even after restarting the container, none of the messages I was getting changed. Still 3 MBs for Upload File and 32 MBs for files in releases. Can anyone point me out what’s wrong soon?


#3

Are you running gogs behind a proxy (e.g. nginx)?
If yes, you need to raise the limit there as well.

Beside that, a max_size of 50 is probably not enough to fit 50mb files in it, try changing it to 60 or 100 even.


#4

I’ve tried numbers as high as 1000, but the limit displayed inside gogs website itself never changed from 3…


#5

Maybe stupid question, but did you restart gogs after changing app.ini?


#6

Yes, I said that on my second message in this post…


#7

I got pushing working by extending the limit in nginx, thanks for that. But the website still doesn’t let me upload anything larger than 32 MBs in releases… My app build is 60 MBs, I really need to put that there!