Skip to content

Request Entity Too Large - Import projects

Summary

I'm trying to import projects, and getting an error about Request Entity Too Large. I ran into this issue previously, (using a earlier version of Gitlab Helm Chart), but was able to fix it by adding 'proxyBodySize' to the ingress configuration. However, I seem to be running into the issue again, trying to import projects.

Either using the API, or using the web GUI, getting a 413 error.
Receive some variation on Request Entity Too Large

I did just try to set webserver: unicorn, and it doesn't seem to have made a difference.

It might be worth noting, that imports over 50MB seem to fail when posting to the API. The web gui only failed on a 288MB import, but not on a 197MB.

Steps to reproduce

  1. Export Gitlab project from legacy gitlab server
  2. Download export to local hard drive
  3. Navigate to new Gitlab server
  4. Click New Project
  5. Fill in Name/Slug
  6. Select archive
  7. Hit Submit

Configuration used

Config attached Config attached

Snip below

gitlab:
  webservice:
    enabled: true
    ingress:
      annotations:
        nginx.ingress.kubernetes.io/proxy-body-size: 2048m
        ingress.kubernetes.io/proxy-body-size: 2048m
      enabled: true
      proxyBodySize: 2048m
    nodeSelector:
      network: private

Current behavior

413 Request Entity Too Large Errors

Expected behavior

Imports to work

Versions

  • Chart: gitlab-4.0.5
  • Platform:
    • Cloud: EKS
  • Kubernetes:
    • Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
    • Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.8-eks-e16311", GitCommit:"e163110a04dcb2f39c3325af96d019b4925419eb", GitTreeState:"clean", BuildDate:"2020-03-27T22:37:12Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}
  • Helm:
    • Client: &version.Version{SemVer:"v2.16.1", GitCommit:"bbdfe5e7803a12bbdf97e94cd847859890cf4050", GitTreeState:"clean"}
    • Server: &version.Version{SemVer:"v2.16.1", GitCommit:"bbdfe5e7803a12bbdf97e94cd847859890cf4050", GitTreeState:"clean"}

Relevant logs


time="2020-06-15T15:09:38Z" level=error msg=error correlation_id=fVTfIErM7b1 error="entity is too large" method=POST uri="/api/v4/projects/import?private_token=[FILTERED]"
git.themill.com 10.168.1.142 - - [2020/06/15:15:09:38 +0000] "POST /api/v4/projects/import?private_token=[FILTERED] HTTP/1.1" 413 25 "" "php-gitlab-api (http://github.com/m4tthumphrey/php-gitlab-api)" 5617

*** /var/log/gitlab/production_json.log ***

time="2020-06-15T15:13:32Z" level=error msg=error correlation_id=HtPuFIoxfv8 error="entity is too large" method=POST uri=/import/gitlab_project
git.themill.com 10.168.1.142 - - [2020/06/15:15:13:32 +0000] "POST /import/gitlab_project HTTP/1.1" 413 25 "https://git.domain.com/import/gitlab_project/new?namespace_id=59&name=&path=" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" 27268

*** Nginx Ingress ***

[15/Jun/2020:14:48:10 +0000]TCP200392440.013
10.218.72.100 - [10.218.72.100] - - [15/Jun/2020:14:48:10 +0000] "POST /api/v4/projects/import?private_token=[FILTERED] HTTP/1.1" 413 25 "-" "php-gitlab-api (http://github.com/m4tthumphrey/php-gitlab-api)" 75891734 10.028 [gitlab-gitlab-webservice-8181] 10.168.2.238:8181 25 3.528 413 bbb089ff44d7aec4f4bef49764b443c3```
Edited by Jason Plum