1

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.

I am using the StreamStopped event to keep the stream running continuously as described here:

How to keep streaming continuously - Tweetinvi

I am starting the stream in my startup class by using hangfire (http://hangfire.io/) to maintain the stream connection in the background but happy to do this any other way.

My application is kept alive 24/7 if no users connect.

However, after a while, with no exception raised, the streams stop.

Is there a better way to maintain and keep alive a stream?

Community
  • 1
  • 1
SSED
  • 475
  • 3
  • 9
  • 22

1 Answers1

0

My keep-alive function wasn't actually working 100% and so my application sometimes died during the night when no users connected hence the StreamStopped event wasn't called. I now use Uptime Robot to hit my site every minute keeping it alive.

SSED
  • 475
  • 3
  • 9
  • 22
  • Just to make sure I understand. Was the fault on the Tweetinvi side or on your side? – Linvi Dec 12 '16 at 11:01
  • Mine - simply when the application timed out during inactivity the StreamStopped event could not possibly be called. – SSED Dec 12 '16 at 11:45
  • thanks - so far Tweetinvi has been brilliant, would recommend to anyone. – SSED Dec 12 '16 at 14:32
  • @SSED How did you use the hangfire? Did you create the stream in the hangfire job? – Layinka Dec 16 '20 at 11:10