Timmy's picture

So I was moving some of my repos off github to my local gitea and I get a 413 reply.


Enumerating objects: 198, done.
Counting objects: 100% (198/198), done.
Delta compression using up to 12 threads
Compressing objects: 100% (190/190), done.
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (198/198), 1.34 MiB | 959.00 KiB/s, done.
Total 198 (delta 37), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

Repo is about 7MB

What can I check or where is there a setting to resolve?
I'm not out of disk space.
I saw SO posts about nginx proxy so I upped that and it appears to be working fine now.

But was this the correct location to properly resolve this issue?
I didn't see a default set in the conf file but obviously, in absence of client_max_body_size 0, it assumes some value.

Jeremy Davis's picture

You don't actually explicitly say where you did it, but assuming that you added (or updated) an increase to somewhere client_max_body_size within Nginx config, then you done good! :)

FWIW, the default value for client_max_body_size is "1M".

Considering it's so small by default, perhaps we should make it a bit bigger by default? What do you think? What size have you updated it to?

I was about to say that it was weird because I have a Gitea server that's been runnign for years and use it a fair bit. I have never hit that issue and just logged in to double check that it still had default settings. It does, but then it occurred to me that I always use SSH with git, so no surprise I've never hit this issue! :)

Timmy's picture

Oof.. yes. I upped client_max_body_size. Don't post support stuff tired kids.

As far as default, I'm not sure. I was pushing a whole repo so it was larger than your avg push and probably larger than most repos, given it had a databse file included and some assets (was an old school project).

Outside of some fully developed SDK or some such, I'm not sure what the avg project sits at. I tried a quick, cursory search of statistics but didn't see anything meaningful.

Really, there were easier ways to get around the issue, once I knew what it was. Simply add the files in smaller chunks. Or actually use migration option, given these were hosted on github for the most part (some stuff was orphaned and local).

But good to know I hit the right option. I know in the future I'll have some work that likely includes a seed database that won't be small.

Also, I'm sure you've seen the flood of spam.

Add new comment