Git to deploy web site no longer working


#1

I’ve been using Git to deploy my web site and I love it. I can create different branches for production, staging, and development. Although I have different developers working on the site simultaneously, there’s never a question of “How did that change get there?” because Git ensures that every change is documented. I even have off-site backup by default because my code is hosted at GitHub.

The problem is that my deploy script just stopped working. I was using a GitHub web hook to fetch changes automatically whenever a developer pushes new commits to GitHub. Here is the script:

<?php header("Content-type: text/plain"); // be explicit to avoid accidental XSS system("/home/jbacc7/bin/git fetch 2>&1"); echo "\nDone.\n";

It always produces the following error message now:

fatal: Out of memory? mmap failed: Cannot allocate memory fatal: The remote end hung up unexpectedly

I find this odd because it works without error in the shell:

[buckeye]$ git fetch [buckeye]$

and directly from PHP:

[code][buckeye]$ php GitHubSync.php

Done.[/code]

I compiled Git myself with NO_MMAP=1 to avoid memory problems by following the directions in the wiki.

I also see in the wiki that Git is not officially supported by DreamHost. Although I like DreamHost, this is important enough to me that if I can’t get it to work again I will consider switching to another hosting provider that supports Git. I can’t imagine going back to developing web sites without it.

Any ideas for how I can get this working?

EDIT:

I just tried “git gc” after using the settings in this post and now things seem to be working again. This is promising.