Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max File Size for LFS Files? #1536

Closed
hillin opened this issue Apr 10, 2017 · 6 comments
Closed

Max File Size for LFS Files? #1536

hillin opened this issue Apr 10, 2017 · 6 comments

Comments

@hillin
Copy link

hillin commented Apr 10, 2017

Issue

Impacted version: 4.11

Deployment mode: standalone app on a Windows Server 2016 machine, intranet access via a 1Gbps wired network

Problem description:
LFS files over 30,000,000 bytes cannot be pushed.

I've created a dummy file (1fb535...) of size 30,000,001 bytes, running

GIT_TRACE=1 git lfs push --object-id origin 1fb535...

gives a 404 error while PUTting (see the log attached at the end of this issue, too long). However, if this file is one byte shorter, it can be pushed successfully.

Is there a place I could config the max file size?

The log attached:

11:31:55.457406 git.c:563 trace: exec: 'git-lfs' 'push' '--object-id' 'origin'
'1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac'
11:31:55.457908 run-command.c:336 trace: run_command: 'git-lfs' 'push' '--object-id' 'origin' '1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac'
trace git-lfs: run_command: 'git' version
trace git-lfs: run_command: 'git' config -l
trace git-lfs: tq: running as batched queue, batch size of 100
trace git-lfs: tq: sending batch of size 1
trace git-lfs: api: batch 1 files
trace git-lfs: creds: git credential fill ("http", "10.2.10.110:1111", "git/project/project.git")
trace git-lfs: Filled credentials for http://10.2.10.110:1111/git/project/project.git
trace git-lfs: HTTP: POST http://10.2.10.110:1111/git/project/project.git/info/lfs/objects/batch
trace git-lfs: HTTP: 200
trace git-lfs: HTTP: {"transfer":"basic","objects":[{"oid":"1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac","size":30000001,"authenticated":true,"actions":{"upload":{"href":"http://10.2.10.110:1111/git/git-lfs/project/project/1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac","header":{"Authorization":"woOeaiGIUPvw9g0wluK/7ChAhyUvd6yUnLD1BDTJE+d6Ucold9sptT0WsFSj2TijvvVh6xvmX+u0uwFbTCn1BztKtoGC6qmJ3Fw0b/tZTPs="},"expires_at":"2017-04-10T03:41:54Z"}}}]}
trace git-lfs: tq: starting transfer adapter "basic"
trace git-lfs: xfer: adapter "basic" Begin() with 3 workers
trace git-lfs: xfer: adapter "basic" started
trace git-lfs: xfer: adapter "basic" worker 0 starting
trace git-lfs: xfer: adapter "basic" worker 1 starting
trace git-lfs: xfer: adapter "basic" worker 1 waiting for Auth
trace git-lfs: xfer: adapter "basic" worker 2 starting
trace git-lfs: xfer: adapter "basic" worker 2 waiting for Auth
Git LFS: (0 of 1 files) 0 B / 28.61 MB trace git-lfs: xfer: adapter "basic" worker 0 processing job for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac"
trace git-lfs: HTTP: PUT http://10.2.10.110:1111/git/git-lfs/project/project/1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac
Git LFS: (0 of 1 files) 0 B / 28.61 MB trace git-lfs: xfer: adapter "basic" worker 1 auth signal received
trace git-lfs: xfer: adapter "basic" worker 2 auth signal received
trace git-lfs: HTTP: 404
trace git-lfs: xfer: adapter "basic" worker 0 finished job for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac"
trace git-lfs: tq: retrying object 1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac
trace git-lfs: tq: enqueue retry #1 for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac" (size: 30000001)
trace git-lfs: tq: sending batch of size 1
trace git-lfs: api: batch 1 files
trace git-lfs: creds: git credential fill ("http", "10.2.10.110:1111", "git/project/project.git")
trace git-lfs: Filled credentials for http://10.2.10.110:1111/git/project/project.git
trace git-lfs: HTTP: POST http://10.2.10.110:1111/git/project/project.git/info/lfs/objects/batch
trace git-lfs: HTTP: 200
trace git-lfs: HTTP: {"transfer":"basic","objects":[{"oid":"1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac","size":30000001,"authenticated":true,"actions":{"upload":{"href":"http://10.2.10.110:1111/git/git-lfs/project/project/1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac","header":{"Authorization":"woOeaiGIUPt8cYJ4Mwq2qyhAhyUvd6yUnLD1BDTJE+d6Ucold9sptT0WsFSj2TijvvVh6xvmX+u0uwFbTCn1BztKtoGC6qmJ3Fw0b/tZTPs="},"expires_at":"2017-04-10T03:41:55Z"}}}]}
Git LFS: (0 of 1 files) 0 B / 28.61 MB trace git-lfs: xfer: adapter "basic" worker 1 processing job for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac"
trace git-lfs: HTTP: PUT http://10.2.10.110:1111/git/git-lfs/project/project/1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac
trace git-lfs: HTTP: 404
trace git-lfs: xfer: adapter "basic" worker 1 finished job for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac"
trace git-lfs: tq: retrying object 1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac
trace git-lfs: tq: enqueue retry #2 for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac" (size: 30000001)
trace git-lfs: tq: sending batch of size 1
trace git-lfs: api: batch 1 files
trace git-lfs: creds: git credential fill ("http", "10.2.10.110:1111", "git/project/project.git")
trace git-lfs: Filled credentials for http://10.2.10.110:1111/git/project/project.git
trace git-lfs: HTTP: POST http://10.2.10.110:1111/git/project/project.git/info/lfs/objects/batch
trace git-lfs: HTTP: 200
trace git-lfs: HTTP: {"transfer":"basic","objects":[{"oid":"1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac","size":30000001,"authenticated":true,"actions":{"upload":{"href":"http://10.2.10.110:1111/git/git-lfs/project/project/1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac","header":{"Authorization":"woOeaiGIUPsyhad92GsQdyhAhyUvd6yUnLD1BDTJE+d6Ucold9sptT0WsFSj2TijvvVh6xvmX+u0uwFbTCn1BztKtoGC6qmJ3Fw0b/tZTPs="},"expires_at":"2017-04-10T03:41:55Z"}}}]}
Git LFS: (0 of 1 files) 4.00 KB / 28.61 MB trace git-lfs: xfer: adapter "basic" worker 2 processing job for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac"
trace git-lfs: HTTP: PUT http://10.2.10.110:1111/git/git-lfs/project/project/1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac
trace git-lfs: HTTP: 404
trace git-lfs: xfer: adapter "basic" worker 2 finished job for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac"
trace git-lfs: tq: retrying object 1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac
trace git-lfs: tq: enqueue retry #3 for "1fb5354d4d618bcff0c01c1540c487d9fb71f35ac83c0c6f8b1e3a0bd8b26eac" (size: 30000001)
trace git-lfs: tq: sending batch of size 1
trace git-lfs: api: batch 1 files
trace git-lfs: creds: git credential fill ("http", "10.2.10.110:1111", "git/project/project.git")
trace git-lfs: Filled credentials for http://10.2.10.110:1111/git/project/project.git
trace git-lfs: HTTP: POST http://10.2.10.110:1111/git/project/project.git/info/lfs/objects/batch

@hillin
Copy link
Author

hillin commented Apr 10, 2017

After a hard searching, I figured out it's IIS who did the trick. All requests are filtered and rejected if its content length is over 30,000,000 bytes by default.
For anyone who also come into this issue, you can change the Maximum allowed content length in IIS as explained in this documentation.

@aadrian
Copy link
Member

aadrian commented Apr 10, 2017

@hillin please extend this https://github.com/gitbucket/gitbucket/wiki/Installation-on-IIS-and-Helicontech-Zoo wiki page with this info.

@hillin
Copy link
Author

hillin commented Apr 10, 2017

@aadrian I've updated the wiki page.

@aadrian
Copy link
Member

aadrian commented Apr 10, 2017

@hillin thanks. I suppose other webservers might also have default values that prevent "unlimited" upload/download :) .

@hillin
Copy link
Author

hillin commented Apr 11, 2017

@aadrian yes, that's totally reasonable. But what surprised me is, although gitbucket is running as a standalone program on my server (started directly with java.exe), it is still under control of IIS.

@takezoe
Copy link
Member

takezoe commented Apr 16, 2017

@hillin Thanks for updating Wiki 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants