Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I recover from "fatal: Out of memory? mmap failed: Cannot allocate memory" in Git?
    primarykey
    data
    text
    <p>Let me start with some context:</p> <p>I had to upgrade a crucial Magento webshop to a new version. To be sure all existing code would still work after the upgrade and make some post-upgrade changes I made a Git repository from the entire Magento installation (excluding obvious content like the 4.5GB of images, ./var directory etc.), pushed it to an origin and cloned it on a dev server. Made a new branch, performed the upgrades, made code changes, committed it all to the dev branch and pushed it back to origin.</p> <p>Now the time has come to upgrade the 'real' shop, meaning i have to merge the master branch on the production server with the dev branch. And then everyhing goes wrong:</p> <p><code>git fetch</code> - works</p> <p><code>git branch</code> says: <code>* master</code> </p> <p><code>git merge origin/dev</code> goes horribly wrong (only output after some waiting):</p> <p><code>fatal: Out of memory? mmap failed: Cannot allocate memory</code></p> <p>Same goes for <code>git checkout dev</code>, <code>git rebase master origin/dev</code> etc.</p> <p>Did some research here on stackoverflow in existing questions and spent an evening of trying suggestions, including (but not limited to):</p> <pre><code>git gc Counting objects: 48154, done. Delta compression using up to 2 threads. Compressing objects: 100% (37152/37152), done. fatal: Out of memory, malloc failed (tried to allocate 527338875 bytes) error: failed to run repack </code></pre> <p>and:</p> <pre><code>git repack -a -d --window-memory 10m --max-pack-size 20m Counting objects: 48154, done. Delta compression using up to 2 threads. Compressing objects: 100% (37152/37152), done. fatal: Out of memory, malloc failed (tried to allocate 527338875 bytes) </code></pre> <p>In addition to the previous command, i also tried <a href="http://git.661346.n2.nabble.com/Large-pack-causes-git-clone-failures-what-to-do-td5481488.html" rel="noreferrer">this</a> (which is pretty similar). As the <a href="http://git.661346.n2.nabble.com/Large-pack-causes-git-clone-failures-what-to-do-td5481488.html" rel="noreferrer">link</a> makes mention of a possible issue with 32-bit systems, perhaps it's wise to mention the specs for the three systems involved:</p> <ul> <li>'dev' server: x86_64 Gentoo 2.6.38-hardened-r6 // 4 cores &amp; 8GB RAM</li> <li>'origin' server: x86_64 Gentoo 2.6.38-hardened-r6 // 2 cores &amp; 4GB RAM</li> <li>'live' server: x86_64 Debian 4.3.2-1.1 2.6.35.5-pv1amd64 // (VPS) 2 cores &amp; 3GB RAM</li> </ul> <p>Does anyone know how I can recover from this? Does repacking on origin work? If it does, how can I convince the production server to fetch a new copy of the repository? Any help would be greatly appreciated!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload