Hey. I looked around the forums and found another relevant thread (link: Sudden increase in 420 (Exceeded connection limit for user) responses from Streaming API ) in which someone was using Tweetinvi and had similar problems. Problems appeared for me after updating the library, as well as after doing some tweaks to my system. Here is what I think happened and how I fixed it:
[the function calls mentioned from here on forth are within the Tweetinvi library in C#]
I was actually starting multiple Streams using different credentials, but in the same application as a result of implementing this feature without proper testing and I was using Auth.ApplicationCredentials rather than Auth.UserCredentials. Since Tweetinvi is using some kind of global Authentication settings, it turns out that what I thought was multiple credentials being served to each stream, I was overwriting the credentials every time I started a new stream, which is why the streams connected properly the first time, but then always gave 420 errors at reconnect (They were reconnecting on the last credentials being input). I solved this by setting the thread credentials using Auth.SetCredentials(), to the credentials I thought should be the thread credentials (but weren’t), just before starting each stream, and now reconnections seem to work. I will test this further, hopefully it works as I described.
My fault was to assume that my code is perfect and that the bugs were on Twitter’s side…
sorry about that
Anyway, I’m still going to keep the REST daily search, until I am sure that the system actually works and there are as few missed tweets as possible. (and keep it under the rate limits)
Thanks @andypiper for prompt replies!