Git pull fatal: Out of memory, malloc failed

前端 未结 4 2095
半阙折子戏
半阙折子戏 2021-02-04 13:11

I\'ve a repo on https://bitbucket.org/

Few days ago by a mistake big number of image files were pushed in the repo. then files were deleted via another push. after that

4条回答
  •  攒了一身酷
    2021-02-04 13:51

    In my case it was something as simple as trying to pull a big repo in a 1GB RAM box without swap.

    I followed this tutorial https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 to create some swap space on the server and worked.

    Their "faster" way:

    sudo fallocate -l 4G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    

    You can make these changes permanent by adding to /etc/fstab:

    /swapfile   none    swap    sw    0   0
    

    They recommend adding to /etc/sysctl.conf:

    vm.swappiness=10
    vm.vfs_cache_pressure = 50
    

提交回复
热议问题