'Azure WCF Relay stops listening to WCF service after some time

I have setup a Azure WCF relay that listens to WCF Service hosted in On-premise server. The relay listens as expected when the service is published or when accessed directly in the browser. The relay shows count 1 in the listeners in Azure portal and a Postman call to relay works. Only after some time say ~30 minutes the listener in the Azure portal becomes 0 and postman request to relay fails with response as no listeners. If i manually open the service in Browser the listener becomes active to 1 and everything works.

enter image description here

Is there a way to make Relay or WCF service to always listen?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source