My connection to the websockets API times out


Hi there,

When I connect to the http push streaming API, the server periodically sends a ‘tick’ message which keeps the connection open.

But, when using the websockets API, only a few tweets are transmitted.

In addition, your server sends a FIN packet, so it seems the connection is being closed by the server.

How do I prevent this from happening/is the websockets API commonly used?

I can provide tcpdump capture if this is of use to datasift.


1. Due to how WebSockets work, it is not necessary to send ticks to keep the WebSocket connection alive. 

2. When you say "using the WebSocket API, only a few Tweets are transmitted", do you mean that you receive fewer Tweets over WebSockets compated to HTTP streaming? Are you using one of our official client libraries?

3. When you receive this FIN packet, do you receive it randomly, or is there something you are doing to trigger it? Do you receive any error messages before the FIN packet?

4. The WebSocket API is commonly used.

If you would like to provide more details, please feel free to submit information such as a tcpdump, stream information, etc to our support team.


Hi Jason,

Apologies for the distraction. Yes it is a 3rd party library (Ning Async Http Client)

I have verified the problem is entirely in the library (or my interpretation of it’s API) and have filled a bug report with the library developers.

The issue is:

Thanks for your time,

Bryan Hunt


Jason, Ha ha… Back I go again… I’ve been working with the provided websockets. Now I’m not sure if it’s my crappy virgin router or if it’s your server - but I do get a RST packet sent to me. I’m going to send the data to your support email. Thanks, Bryan