We have an Azure Worker role which has a memory leak. We need to get it out to production quickly. The leak is not severe. So is there a way to force the worker role to recycle every hour?
Once you exit your Run()
loop, the role instance should recycle. You'd just need to set up some type of timer to trigger the exiting of the loop. How you do that is up to you, but there are built-in services such as Azure Scheduler, where you can then trigger an action to signal your worker instance(s) to exit their loop (e.g. with a queue message).
You'll need to make sure you deal with instance-specific role restarts, vs global "restart all instances" (since you don't want your app appearing to go offline).