I’ve been having major troubles when I am deploying my Node.js application. It will often get stuck deploying in the Azure Web App b/c of the oryx build process. This is highly frustrating because it already takes close to 10 minutes to produce the build and deploy the web app. These deployments stick regardless of push via Visual Studio Code or through Azure DevOps Pipeline. They don’t stick all the time but when they do it’s seemingly permanent. In this blog I’ll cover the issue that happens and what you can do to revive it.

You’ll know it’s stuck when the deployment takes forever and you check the deployment logs in the Deployment Center and the output is the same each time.

You’ll also know it’s stuck if you try another deployment and you get this error

Error Type 409. “Error: There is a deployment currently in progress. Please try again when it completes.”

Option 1) Delete the web app and recreate it

If you’ve done some research on these you’ll see some issues or forum posts on the topic. Most people have just given up and deleted the entire web app and recreate it from a clean slate. This will work but the package will get stuck again and you’ll soon find that it will become too much work to do all that.

Option 2) Delete the deployment lock files

I literally just started rummaging around the file system when I noticed the deployments folder with some lock files. I cleared that folder, restarted the web app and was able to redeploy again.

These two options will help you get past the stuck in deploying for the current moment. I’m now on the hunt for the cause of the issue. I know this doesn’t happen with the same app deployed to the windows container. It’s somewhat isolated to a Linux container, node.js, and the oryx build. If I figure that out I’ll be sure to post that in a future blog.

Comments
  • billspat
    Posted at 4:09 pm August 5, 2022
    billspat
    Reply
    Author

    this was helpful to me as I had the same issue. You didn’t say which files you deleted but here they are. Hopefully that will same someone else some time.

    rm /home/site/locks/status.lock
    rm /home/site/locks/deployment/info.lock

    However after this, At the end of the re-build, I got the error
    “Failed to retrieve remote build status, please visit … ” and looking at the deploy log, they all failed. I ran it again and it worked.

    this saved me significant time. Thank you!

    this worked with the functions premium plan which allows you to ssh into the app. Not sure how you would do that with the consumption plan.

  • Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.