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

[Question]: Self Hosted Agent : Git Fetch : fatal: not enough memory for initialization #4570

Closed
1 of 4 tasks
mailtocprakash opened this issue Dec 13, 2023 · 4 comments
Closed
1 of 4 tasks

Comments

@mailtocprakash
Copy link

Describe your question

Checkout Task Fails in Self Hosted Agent
during git fetch throws below error
"fatal: not enough memory for initialization"

pls help here

Versions

vsts-agent-win-x64-3.230.2

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Operation system

No response

Version controll system

No response

Azure DevOps Server Version (if applicable)

No response

@DmitriiBobreshev
Copy link
Contributor

Hi @mailtocprakash, please check that you have enough free memory on the machine where the agent is running.
If you use large repositories you could try shallow fetch.
In some cases might help to enable option FIX_POSSIBLE_GIT_OUT_OF_MEMORY_PROBLEM variable, if the option is enabled, mingit 2.42.0.2 will be used instead of the 2.39.1.

@mailtocprakash
Copy link
Author

I have unzipped the agent in C: drive in Azure VM, where it has 114 GB free space is available and my git repo size is 20 MB only.

Can you elaborate how to set the [FIX_POSSIBLE_GIT_OUT_OF_MEMORY_PROBLEM ] variable in sel-hosted agent VM machine? or in pipeline ?

@DmitriiBobreshev
Copy link
Contributor

DmitriiBobreshev commented Dec 14, 2023

@mailtocprakash, the error says that you don't have enough free RAM. How much free RAM do you have after the agent is running?
You can set FIX_POSSIBLE_GIT_OUT_OF_MEMORY_PROBLEM as a Pipeline variable or as os env variable

@mailtocprakash
Copy link
Author

Increased the size of the VM from 1 GB RAM to 4 GB RAM, Now Git fetch started working.

Thanks a lot @DmitriiBobreshev

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

No branches or pull requests

2 participants