Why does Azure give me an intermittent Error 503. The service is unavailable?

11,767

Solution 1

Looking at the monitoring on my service told me the processor was never exceeding 6% of usage, so it couldn't be a lack of resource causing these intermittent 503 errors. It's bizarre and I'm afraid I have no explanation for it, but simply redeploying the cloud service to Azure appears to have done the trick. It now works perfectly. The solution has not changed, so I can only imagine that whatever 'reboot' is necessary after deployment, has rectified whatever the problem was. All I can suggest is that you try the same thing if you are getting intermittent 503 errors.

Solution 2

For me the error went away when I set up auto-scaling. I think failover requests were getting routed to my second VM, and the second VM took some time to spin up because it wasn't ready for the activity. Auto-scaling shut down my second VM and the error no longer appears (I'm assuming it will spin up if/when I get enough traffic to use it).

Hope this also helps someone.

Share:
11,767
Flippsie
Author by

Flippsie

Updated on June 23, 2022

Comments

  • Flippsie
    Flippsie almost 2 years

    I have an Azure service that has been running for a long period of time. It builds a word or powerpoint document based on arguments in the request and returns a uri to the build document. This is access via a visualforce page, when you click a button, it calls the service and displays a link to the document that has just been built. Simple.

    All of a sudden, I get an apparently random 503 Service Unavailable error. Sometimes I click the button, no problem. Other times a 503 error. Each time the button triggers exactly the same request. Does anyone know why this might be happening?

    Apparently doing the same thing over and over again and expecting a different result, is not insanity!

    Thanks for taking the time to read this.

  • Flippsie
    Flippsie over 10 years
    How can this be when I am the only one consuming this service? It's not as if I have thousands of requests.
  • Co7e
    Co7e about 10 years
    Exactly the same thing occurred on our site straight after a deployment. After a second identical deployment it fixed the problem.
  • jaisonDavis
    jaisonDavis over 8 years
    We had the same problem. Fixed it by scaling up the server.