Git Garbage Collection Errors

We are running TeamCity 2017.2.1 Build 50732 on a Linux box (Linux 2.6.32-431.el6.x86_64 #1 SMP 2013 x86_64 x86_64 x86_64 GNU/Linux). We installed git so that TeamCity could run garbage collection. We continue to receive the following error:

Errors while running git garbage collection (paths are relative to the '<TeamCity data dir>/system/caches/git' directory) Show details »
git@bitbucket.org:healthcaresynergy/webapplication.git (clone dir git-ED62E050.git): Error while running garbage collection jetbrains.buildServer.vcs.VcsException: 'git repack' command failed. stderr: fatal: Unable to create temporary file: Too many open files exit code: 1
 
We have increased the maximum number of files for a process to be 1000000 and still get the same issue.
 
Any ideas?
 
Thanks,
0
6 comments

Hi Damien,

there are two limits of open files to take into account, the system-wide limit and the per-user limit. Can you confirm that you have increased both? This error is not uncommon when one of the two is still too narrow.

0

Login / logout can be required for the limits to apply. Please have a look: https://stackoverflow.com/a/18734082

0

We actually restarted the box after making the changes and it still gives us this error

0

Did you try to run git gc from the command line in the directory: <TeamCity data dir>/system/caches/git/git-ED62E050.git ? Does it work?

0

run
git gc <TeamCity data dir>/system/caches/git/git-ED62E050.git 
not worked. 

"fatal: Not a git repository (or any parent up to mount point /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)."

0

Hi all, 

I am also getting this warning on TeamCity but I don't use Git for version control. I am using Subversion instead of it. May I know the reason and Solution for that. Thanks

Regards,                                                                                                                                                                  Khopi

 

0

Please sign in to leave a comment.