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

[BUG]: DownloadAsyncV2 downloads to memory instead of disk #5017

Open
1 of 4 tasks
philipborg opened this issue Oct 17, 2024 · 1 comment
Open
1 of 4 tasks

[BUG]: DownloadAsyncV2 downloads to memory instead of disk #5017

philipborg opened this issue Oct 17, 2024 · 1 comment

Comments

@philipborg
Copy link

What happened?

While downloading using DownloadBuildArtifacts@1 task it seems to download to memory. That task in turn just calls the DownloadBuildArtifactTaskV1_0_0 plugin located in this repo, hence it's being placed here.

What has been observed is that when downloading a larger file, in our case ~450MB, is that the agent memory usage increases by the download progression exactly and then freezes when it can no longer allocate more memory as those agents only have 1GB of RAM in total. Thus my conclusion is that the code downloads the artifact to memory instead of onto disk.

Versions

Current agent version: '3.245.0' / Debian 12

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)

Azure DevOps Server Version (if applicable)

No response

Operation system

No response

Version controll system

No response

Relevant log output

No response

@ismayilov-ismayil
Copy link
Contributor

Hi @philipborg,
We have identified that high memory usage during artifact downloads may depend on the storage type and whether the files are compressed. When using Blob Storage without gzip compression downloads are typically streamed directly to disk, minimizing memory usage. However, with regular file storage and compressed blob artifacts, downloads may be loaded into memory, causing agents with limited RAM to freeze. To address this, we recommend verifying your storage backend and adding file compression in your pipeline if it's not blob storage. Compressing artifacts ensures that downloads are handled efficiently by streaming to disk, which reduces memory consumption and prevents agent freezes.
you can use ArchiveFiles task to compress artifacts before publishing it

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

3 participants