The error message you are encountering, specifically the exit code 137, typically indicates that the task agent was terminated due to an out-of-memory (OOM) condition. This can happen if the agent runs out of available memory while executing a task, leading to the operating system killing the process to free up resources.
Since you mentioned that the timeout is set for more than 3 days, it’s important to ensure that the agent has sufficient resources allocated to handle the workload. Here are a few steps you can take to troubleshoot and potentially resolve the issue:
- Check Resource Allocation: Ensure that your self-hosted agent has enough CPU and memory resources available. If it's running on a virtual machine, consider resizing it to a larger instance type.
- Enable Verbose Logging: Enable verbose logs for your pipeline to get more detailed information about resource utilization. This can help identify if a specific task is consuming excessive resources.
- Optimize Tasks: Review the tasks in your pipeline to see if there are any that can be optimized to use less memory or run more efficiently.
- Monitor Resource Usage: Use monitoring tools to observe the resource usage of your agent during the pipeline execution to identify any spikes or patterns that may lead to the OOM condition.
If the problem persists, consider reaching out to Azure DevOps support for further assistance.
References: