API Connection Dropping Constantly

streaming
bug
api

#1

I am having a serious problem with the streaming API, and I am pretty sure the issue is server-side. This issue first happened yesterday afternoon, and is now happening again this morning.

I am using DMI-TCAT to connect to the streaming API and the connection is being dropped at least once per minute. After the issue resolved itself last night, I had maintained a stable connection until this morning when I disconnected to add more track terms. When I reconnected the Twitter servers started dropping my connection regularly again.

After a connection is made, some tweets are delivered, and then the connection is dropped without any error from the Twitter servers at all!

Between yesterday and today, throughout the issue, client configuration has not changed.

Any API administrators around? Anyone else having the same issue?

Update: Every time I am disconnected, I am pointed to a different IP address (DNS load balancing) and the issue continues to happen regardless.

Update: Below is the error I am receiving from cURL. And a link explaining the server-side issue further.

'error' => 'transfer closed with outstanding read data remaining',
'errno' => 18

curl error 18 - transfer closed with outstanding read data remaining

Update: Streaming endpoint is sending TCP-FIN after between the 3,989th and the 3,993rd TCP-ACK. Issue is still ongoing. See graph below.


#2

It may or may not be something to do with keep-alive? So it could be the library. Try running the same thing with https://github.com/twitter/hbc Does the same thing happen?


#3

Since yesterday I have tried playing around with the HTTP headers, no help. This started without any modifications made to the code on my side, so I am pretty sure it’s something server-side.

The exact same thing happened late Wednesday night for about two hours, it started when I dropped connection to update tracking terms, and resolved by itself. I didn’t think much of it until this started happening constantly.