Search code examples
azure-storage

Random ECONNREFUSED errors accessing Azure Storage


we are currently facing connection refused issues in our production environment when downloading files stored on our Azure Storage account. Node gives us this error randomly:

Error: connect ECONNREFUSED 52.239.194.36:443
        at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

The random aspect of this issue makes it hard to find a cause.

Some clues we gathered so far :

  • every refusal comes from ip 52.239.194.36
  • our relevant firewall rules
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
  • since original requests are issued by our customers, our server act as a proxy for azure files thus all connections to azure come from our IP. May we hit some DDOS protection ?

Any ideas welcome ! Feel free to ask more details. Thanks !


Solution

  • After contacting Azure's support without much result, I ran into this document :

    https://learn.microsoft.com/en-us/azure/architecture/best-practices/transient-faults

    TL;DR; It says network errors are to happen one day or another and thus any cloud based application should be resilient to such transient issues.

    The solution here is to implement some retry procedure for our cloud interactions.