I am getting 420 as output


#1

I am also gettting my output as
420
420
420
420
420

i am trying to use:-
stream.filter(track=[“My KeyWord”])

i am saving my result in elasticsearch
Please help i need to complete my project


#2

From the Streaming documentation:

Clients which do not implement backoff and attempt to reconnect as often as possible will have their connections rate limited for a small number of minutes. Rate limited clients will receive HTTP 420 responses for all connection requests.

You should read that page for advice on how to proceed.


#3

how do i solve this issue?


#4

I need to get it done!! help twitter!! help!!


#5

If you’re able to share any code that shows what you’re doing, that would be helpful. The output you’ve shared doesn’t help us to understand exactly what you are doing I’m afraid.

I’m not clear on why you are reconnecting or getting the 420 errors. You’ll certainly get a 420 if you keep trying to reconnect too quickly, or have multiple streams open.

The page I linked above suggests that you implement an exponential back off if you do hit a 420, but otherwise you should have a single connection open and keep it open for as long as possible.