Search code examples
httpnginxgitlab-omnibus

Self-hosted gitlab server with with RPi and pitunnel showing http error 413 when trying to push


1. Problem

The git push command returns the following error if one file is larger than ~1MB:

Pushing to http://mygitlabserver.pitunnel.com/root/my_project.git
POST git-receive-pack (1163897 bytes)
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

The server is an RPi 4 with an SSD attached. Accessed via pitunnel (standard subscribtion).

  • The push fails if one file is larger than 1MB
  • The push returns no error even if the commit is 150MB (a lot of small files)
  • The push returns no error if an mp3 file of multiple MBs gets pushed.

2. Problem

Not really a problem but it can be related to the other one

If a large project is imported that was exported from gitlab.com it returns the same error:

413 Request Entity Too Large nginx/1.10.3 (Ubuntu)

But only if connected via pitunnel (link), it works if the project is uploaded in the local network.

The nginx seems to be the problem. In the gitlab.rb file the following parameters are set and the gitlab service was restarted according to the gitlab docs:

nginx['enable'] = true
nginx['client_max_body_size'] = '900m'

PS: The repo will use git LFS after this problem is solved.


Solution

  • for all with similar a similair problem: Pitunnel was the problem.