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

git.GitCmdObjectDB consuming system's resources #51

Closed
llonchj opened this issue Mar 12, 2012 · 3 comments
Closed

git.GitCmdObjectDB consuming system's resources #51

llonchj opened this issue Mar 12, 2012 · 3 comments
Labels

Comments

@llonchj
Copy link

llonchj commented Mar 12, 2012

Using GitPython==0.3.2.RC1 with Python 2.7.1 on a Fedora 15 with "/etc/security/limits.conf" nproc set to 25000 for the user running the test.

After repetitive calls to different repositories using git.GitCmdObjectDB, the system resources decrease reaching a "OSError: [Errno 24] Too many open files" exception.

This does not happen with the default odbt (gitdb).

Digging into the problem, lsof outputs lots of "pipe" processes. Possibly, the calls to git command using subprocess modure aren't properly deallocated.

Is this a bug?

Thanks,

@Byron
Copy link
Member

Byron commented Mar 12, 2012

If the GitCmdObjectDB is used, each repository instance will have two slave git processes which stream objects from the git database. If for some reason the repositories don't get deallocated, the slave processes would stay intact. As a workaround, you might check when you create repositories, and if they get deleted at some point.

However, there might also be a bug of some kind, in theory at least the destruction of the repository should close the pipes which connect to the slave processes, which in turn should shut down the attached process. Something might not work there.

@llonchj
Copy link
Author

llonchj commented Mar 12, 2012

I just solved the problem by using gitdb.
Thanks you've made a fantastic python module!

@Byron
Copy link
Member

Byron commented Jun 7, 2012

Just for completeness: This is related to #58 .

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

No branches or pull requests

2 participants