{"thread":{"id":"29338","subject":"Intriguing error with Git 1.6.3.1: Too many open files","startedAt":"2012-01-11T02:44:16Z","lastAt":"2012-01-11T07:18:51Z","messageCount":4,"participants":["Soham Mehta","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"182299","messageId":"CALjyegUJ+ZY7g0Lpxqs=gvAyhtYW_a3SNWVybSG4EG3X=ROV9Q@mail.gmail.com","threadId":"29338","inReplyTo":null,"subject":"Intriguing error with Git 1.6.3.1: Too many open files","fromName":"Soham Mehta","fromEmail":"soham@box.com","sentAt":"2012-01-11T02:44:16Z","receivedAt":"2012-01-11T02:44:16Z","isPatch":false,"sender":{"key":"soham@box.com","avatar":null},"body":"We use Git (1.6.3.1) exclusively here at Box.\n\nStarting this afternoon, we started getting errors when pushing to one of\nthe repos. It is a very active, bare shared repo, shared among\nmultiple developers. The\nerror is:\n\n*\"error: unable to open object pack directory: ./objects/pack: Too many\nopen files\"\n\nThings I tried/observed to resolve it:\n\n1) ulimit -H = unlimited, when run as root (original error seems\nmisleading?). I also killed other proceses that had some open files, and\nbrought down the total count of open files (roughly lsof | wc -l) to <1000.\n\n2) I can push to several other repos on the same machine just fine\n\n3) git fsck, git gc, git-branch and git-status return the same error\n\n4) I copied the repo (using scp -r, git-clone failed) to a different\nmachine, but got the same errors when pushing to it\n\n5) I asked #git and the suggestion was that the repo is somehow corrupt and\nI should re-push to it\n\nOne more thing worth mentioning: Gerrit (code review) uses the same repo\n(lots of stuff in refs/changes)\n\nIf the repo is indeed not recoverable, I know how to restore it. But I'd\nrather fix this if possible. Wondering if it is worth pursuing and what\nmight be wrong?\n\nThanks.\n-Soham\n"},{"id":"182303","messageId":"20120111030931.GA12862@burratino","threadId":"29338","inReplyTo":"CALjyegUJ+ZY7g0Lpxqs=gvAyhtYW_a3SNWVybSG4EG3X=ROV9Q@mail.gmail.com","subject":"Re: Intriguing error with Git 1.6.3.1: Too many open files","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-01-11T03:09:31Z","receivedAt":"2012-01-11T03:09:31Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nSoham Mehta wrote:\n\n> *\"error: unable to open object pack directory: ./objects/pack: Too many\n> open files\"\n\nDo current git versions (v1.7.4.2 or later) behave the same way?\n\nSorry for the trouble,\nJonathan\n"},{"id":"182322","messageId":"CALjyegVzchN==DEsARD65jEmz0BkkbYMQRhG=ujNiGCBHuB4SQ@mail.gmail.com","threadId":"29338","inReplyTo":"20120111030931.GA12862@burratino","subject":"Re: Intriguing error with Git 1.6.3.1: Too many open files","fromName":"Soham Mehta","fromEmail":"soham@box.com","sentAt":"2012-01-11T06:52:46Z","receivedAt":"2012-01-11T06:52:46Z","isPatch":false,"sender":{"key":"soham@box.com","avatar":null},"body":"On Tue, Jan 10, 2012 at 7:09 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Hi,\n>\n> Soham Mehta wrote:\n>\n>> *\"error: unable to open object pack directory: ./objects/pack: Too many\n>> open files\"\n>\n> Do current git versions (v1.7.4.2 or later) behave the same way?\n>\n> Sorry for the trouble,\n> Jonathan\n\n\nI haven't played with versions yet. Are you alluding that #2 on this\nlist may have addressed it?\nhttps://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.4.2.txt\n\n * We used to keep one file descriptor open for each and every packfile\n   that we have a mmap window on it (read: \"in use\"), even when for very\n   tiny packfiles.  We now close the file descriptor early when the entire\n   packfile fits inside one mmap window.\n\n\nThe corrupt repo does have a 1000+ pack files, anywhere from 650M to 2.5K.\n"},{"id":"182324","messageId":"20120111071851.GA28655@burratino","threadId":"29338","inReplyTo":"CALjyegVzchN==DEsARD65jEmz0BkkbYMQRhG=ujNiGCBHuB4SQ@mail.gmail.com","subject":"Re: Intriguing error with Git 1.6.3.1: Too many open files","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-01-11T07:18:51Z","receivedAt":"2012-01-11T07:18:51Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Soham Mehta wrote:\n\n> I haven't played with versions yet.\n\nFor almost all purposes, the latest stable version should work fine\n(v1.7.8.3 at the moment).  The people on this list tend to be very\nkeen to hear about cases where that's not true --- if people are stuck\nusing old versions because of regressions, that means we're failing.\n\n> Are you alluding that #2 on this\n> list may have addressed it?\n> https://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.4.2.txt\n\nNot exactly.  I was thinking of commit c7934306 (Limit file\ndescriptors used by packs, 2011-02-28).\n\nIn git time, 1.6.3.1 is ancient history.  There are many little fixes\nand performance improvements you are missing out on.\n\nJust my two cents,\nJonathan\n"}]}