Hi, since around 17:30GMT on 14/4/2014 we’ve seen a sudden increase in the number of 420 responses we’re getting form the Streaming API. ie. from zero, to happening once every 5-10 connections or more.
We’ve seen this happening across a couple of different different data centres around the world, so it doesn’t seem to be geographically specific. The client in question uses track, not follow, and tracks around 300-400 terms simultaneously. It gets restarted every 5 minutes to change the terms it’s tracking. We’ve been using this system continuously for a number of years without any problems.
The error we’re getting - ‘Exceeded connection limit for user’ - seems to indicate that the Twitter systems think we have more than one connection open for the credentials we’re using, however we don’t.
We’ve tried several things so far here to try to figure out what might be going on.
- Created and tested using a fresh account and API keys to ensure the issue isn’t connected to a specific account problem.
- Verified that our client properly implements an exponential backoff when a 420 is received, starting at 60s.
- Added a ten second pause between disconnect and reconnect to mitigate any issues with the servers believing we’re still connected.
- Increased the reconnect interval of our client from 5 to 10 minutes (this decreased the 420 rate as we were reconnecting less often, but didn’t resolve the problem).
- Updated our client library (twython) to the latest available version to try to ensure there are no errors in client connection logic.
Could you please advise whether there has been some change to the way client connection limits are being applied which might be causing this problem. Or if there is some other ongoing issue with 420 responses.
Regards,
Alex Kelly
Lead Developer
Smesh (http://sme.sh/)