I have been using Gitlab in production for a while now and recently I brought in some repos with a crapload of PDF files. And gitlab is either 500 erroring on view or displaying 0 changed files.
I'm not sure if it is something that can be fixed or not (it might be a Grit issue, but I don't see any issues with anyone mentioning large commit issues), but it is an issue that needs to be looked at.
Designs
An error occurred while loading designs. Please try again.
Child items
0
Show closed items
GraphQL error: The resource that you are attempting to access does not exist or you don't have permission to perform this action
No child items are currently open.
Linked items
0
Link issues together to show that they're related.
Learn more.
I also did a commit with a 36 mb pack file (approx 4000 files (images, php files, text, database schemes, all text and images)) and it won't load the commit information.
It may be a good idea to load the commit page then ajax load the commit information, to prevent the 500 error's and massively long waiting times for fairly large commits.
By Administrator on 2012-04-04T18:55:47 (imported from GitLab project)
By Administrator on 2012-04-04T18:55:47 (imported from GitLab)
The very first commit should also not show a commit history, as chances are it is too large to display. Or don't display the diff only, just the files added.
Gitorious for example has options for Raw Diff (without graphics) and Raw Patch for very first commit. And doing the same 36 mb pack file upload on their works, but the Raw Diff and Raw Patch report
This Git object is too large to be displayed in the browser
Consider cloning the repository locally and look at the object there
Which is true. And which is acceptable.
Unless we are somehow able to duplicate GitHub, which manages to display the diff fine (slightly slow, but still works).
Showing 4,022 changed files with 674,249 additions and 0 deletions.
It also seems to only show 50% of those (probably about 500-1000 diffs) and the rest display.
205 additions, 0 deletions not shown.
By Administrator on 2012-04-04T19:25:53 (imported from GitLab project)
By Administrator on 2012-04-04T19:25:53 (imported from GitLab)
I think GitHub has a bigger git_max_size option.
In GitLab Grit raise error cause commit is too big. I'm trying to get only stat with files changed in this case. I'll try to do something with it
By Administrator on 2012-04-04T19:52:18 (imported from GitLab project)
By Administrator on 2012-04-04T19:52:18 (imported from GitLab)
It did help slightly, but it is still doesn't display the large commit (4000+ files). But it didn't timeout either, it just kind of crashed my browser.
The problem seems is that it is trying to get the blob contents for every single file (minus the binary) and display it.
Is there a way just for my testing sake to limit the amount of times it gets the blob contents?
By Administrator on 2012-04-05T02:19:02 (imported from GitLab project)
By Administrator on 2012-04-05T02:19:02 (imported from GitLab)
Just to bring this back up. I was still experiencing a 500 error when viewing a few commits (I did a few more). Upon removing the charlock holmes stuff it works perfectly fine.
This fix will work for me because I work with same charset for everything. But this won't work for those who need charlock holmes.
I am wondering if maybe rather then loading every single file transcoded at the same time, could you perhaps show a loading thing and do maybe 500 at a time or something? Just something to queue it a bit more rather then all in a big giant chunk to let charlock holmes not run out of memory. Because if it is trying to reencode 4000 files I can easily see how it would crash. It could also be that my 4 year old server does not have enough horsepower to process it.
By Administrator on 2012-04-06T15:43:36 (imported from GitLab project)
By Administrator on 2012-04-06T15:43:36 (imported from GitLab)
We're seeing this issue. When we hit a large commit puma starts spinning at 100% CPU (waiting on a futex) and never comes back. We've increased our git max_size to 16MB (the "big" commit is 2MB, and added binary files).
Anybody else run into puma issues? Running top shows this:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 39863 gitlab 20 0 1170m 530m 4164 S 99.6 3.3 1:37.75 ruby /home/gitlab/vendor/bundle/ruby/1.9.1/bin/puma -e production -C /home/gitlab/config/puma.rb
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-grit-2.5.1/lib/grit/git-ruby.rb:119: warning: conflicting chdir during another chdir block
repeated many, many times.
Ooh! This verifies the hunch I had earlier while investigating #4668 -- gitlab is doing File.chdir() behind the scenes (e.g. the Grit repo.refs() function) and that can be very bad.
For example, the satellite merge request code depends on the current directory being correct. Why? Grit passes --git-dir to git but does not pass --work-tree. That's a recipe for disaster. If you don't specify the --work-tree then git will use the current directory, whatever that may be, and use it. So if you do something like "git clean -fdx" or "git reset --hard" and someone else does chdir() behind its back, then git will go and totally clobber whatever directory was chdir()'d to.
This is really a problem in Grit. It should use both --git-dir and --work-tree. Using one without the other is a recipe for disaster.
Anyways, so there are multiple things going on here. This issue is specifically about large commits, and I think the problem is puma.
By Administrator on 2013-08-06T21:20:35 (imported from GitLab project)
By Administrator on 2013-08-06T21:20:35 (imported from GitLab)
I retract "blame puma" -- we upped our git timeout to 10 minutes and also changed our Apache configuration to have "Timeout 600" and we're now able to see large commits. Granted, they do take a long time to render (6 minutes for a diff with ~100K changed lines), but at least we see them now. Anyways, mentioning it here in case anyone else is also running gitlab through a proxy (in our case, that's apache).. you'll also need to up your proxy timeout limits.
By Administrator on 2013-08-06T21:58:55 (imported from GitLab project)
By Administrator on 2013-08-06T21:58:55 (imported from GitLab)