PixelStreaming gets pixelated over time

I’ve built a pixel streaming app and have been testing it on an azure virtual machine. The problem I’m having is if the stream keeps running for a long time, say 30 minutes, it gets pixelated and stays like this forever. Once you refresh the page the video quality is back to normal. Any ideas?