My Azure Pipeline is suddenly taking way too long to execute and getting failed

Mx Validator 5 Reputation points
2025-03-29T06:46:27.8366667+00:00

All of sudden my Pipelines are taking 1 hour to run and after which they gets failed automatically. It was all good before nothing major has been changed in the code too.

User's image

Azure DevOps
{count} votes

2 answers

Sort by: Most helpful
  1. Abiola Akinbade 29,570 Reputation points Volunteer Moderator
    2025-03-30T16:16:39.0366667+00:00

    Look at the build logs for a specific step that takes most of the 1-hour duration. Usually a long hang is followed by an agent timeout, and the job gets killed automatically. You can post the step.

    A possible cause could be concurrency limts.

    Did you change your image? If you did, revert and test

    It is also possible that your run was impacted by a transient network issue, credential failures, services outages, etc.. From https://status.dev.azure.com/ there is no outage so you can try again.

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    (Please note: If you have Priority Community support please wait for a dedicated Microsoft support representative to assist you, as they have access to the necessary backend resources. If you have not yet opened a support case, we recommend reaching out through the support channel available under your subscription level.)

    Regards,

    Abiola


  2. Bodapati Harish 820 Reputation points Microsoft External Staff Moderator
    2025-04-02T07:10:21.5066667+00:00

    Hello @Mx Validator ,

    From what I see in your screenshot, your recent Azure Pipelines have all started taking about an hour to run and then fail. That’s a big jump compared to earlier builds which were completing in under 10 minutes and passing without issues.

    The failures seem to consistently happen after the same stage completes. It looks like the issue isn't with the whole pipeline but with something specific in one of the steps or tasks that changed behavior maybe even silently.

     First, look at the logs in detail, especially at the stage that’s showing a red X. Try to pinpoint where exactly it’s getting stuck. Often, one task ends up hanging or waiting for something that never comes like a service response, a file lock, or a network call.

    It could also be related to the build agent. If you’re using Microsoft-hosted agents, sometimes there are updates or image changes that can affect performance. You might want to try switching to a different agent image like ubuntu-latest or even a self-hosted agent if you have one available.

    Another thing to consider is caching or artifacts. If you're uploading or downloading large files, that might be slowing things down more than expected. Check if there’s been a sudden growth in file size or if something in the pipeline is looping unintentionally.

    And just to rule it out, compare the pipeline YAML from a successful run and a failed one. Even if you haven’t made any major changes, sometimes small tweaks or auto-updates in dependencies can have unexpected effects.

    Hope this Helps!


    If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.