Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Deploy artifact containing many small files

    Scheduled Pinned Locked Moved Support
    buildmasterperformance
    4 Posts 1 Posters 12 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Currently when deploying artifact, it seems to extract the artifact first on server and send the files individually over to agent.

      I have a case where the latency between the bm server and agent is quite slow, copying 1 bigger file is much faster than copying many small files, let alone the artifact is compressed.

      The deploy task occasionally results in
      Unhandled exception: System.IO.IOException: The process cannot access the file 'xxx' because it is being used by another process. Probably caused by this, as there shouldn't be other processes locking newly transferred files.

      Would it be possible to transfer the artifact to the agent first, and let the agent handle the artifact from there? Should be faster and hopefully not causing the occassional error.

      Product: BuildMaster
      Version: 5.3.8

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        The Deploy Artifact Operation/Action does a differencing of the files in the target (remote) folder, and the files contained in a zip, and then sends those over in stream. So, it's quite fast compared to sending a whole zip, or the Transfer Files Operation/Action. But you could do those too.

        You should definitely investigate that file in use. Unless you have simultaneous deployments running against the same folder in BuilldMaster, another program is locking the files. It might be an anti-virus/malware tool that's scanning a changed file. Also, if you haven't already, take a look at Avoiding Process Cannot Access File Errors with ASP.NET Deployments

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          I'm not sure how the differencing works. My doubt is usually the deploy artifact would clear the target directory first, so does that mean the differencing would be effectively copying full files? I observed the files appearing in the folder one by one. For some larger files (a few mb), the size increases gradually. If the files contained in a zip being transferred as a whole, shouldn't they be appearing almost all at once?

          There might be ant-virus/malware tools scanning changed files, especially .exe files. Unfortunately, sometimes the .exe files is relatively large that their size increases gradually, therefore probably locked by the anti-virus tools while the deployment is still going.

          I wasn't deploying asp.net files, only plain console. So stopping AppPool is not needed.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            If the files contained in a zip being transferred as a whole, shouldn't they be appearing almost all at once?

            It's like downloading a file from your browser... the files are sent are written to disk as they are being streamed.

            Unfortunately, sometimes the .exe files is relatively large that their size increases gradually, therefore probably locked by the anti-virus tools while the deployment is still going.

            That could happen; it's possible the AV tool is acquiring a lock between chunks. In this case, your best bet would be to disable the AV tool or, if not possible, then use the zip method you described.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation