title: Tweetinvi keep stream alive
body: <p>I run my web app using Amazon EC2 servers and use TweetInvi to maintain a user and filtered twitter stream. I need the streams to be running 24/7.</p>
  
  <p>I am using the StreamStopped event to keep the stream running continuously as described here:</p>
  
  <p><a href="https://stackoverflow.com/questions/31319449/how-to-keep-streaming-continuously-tweetinvi">How to keep streaming continuously - Tweetinvi</a></p>
  
  <p>I am starting the stream in my startup class by using hangfire (<a href="http://hangfire.io/" rel="nofollow noreferrer">http://hangfire.io/</a>) to maintain the stream connection in the background but happy to do this any other way.</p>
  
  <p>My application is kept alive 24/7 if no users connect.</p>
  
  <p>However, after a while, with no exception raised, the streams stop.</p>
  
  <p>Is there a better way to maintain and keep alive a stream?</p>