Error connection timed out


Recently, this bug happen everyday. If I re-run, sometime it is can be successful, sometime it returns the same error.
Sometime, 1 account_id always return connection time out error although I re-run many times. I try another account_id, it is still good. So, why?

I want to ask the reason why it happen every day. Is that any way to reduce this bug.

This bug happen when I get list of scoped_timeline.

GET accounts/:account_id/scoped_timeline
Reference link:

The error content is:

Caused by: org.apache.http.conn.HttpHostConnectException: Connect to [] failed: Connection timed out (Connection timed out)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(
at org.apache.http.impl.execchain.MainClientExec.establishRoute(
at org.apache.http.impl.execchain.MainClientExec.execute(
at org.apache.http.impl.execchain.ProtocolExec.execute(
at org.apache.http.impl.execchain.RetryExec.execute(
at org.apache.http.impl.execchain.RedirectExec.execute(
at org.apache.http.impl.client.InternalHttpClient.doExecute(
at org.apache.http.impl.client.CloseableHttpClient.execute(
at org.apache.http.impl.client.CloseableHttpClient.execute(

Caused by: Connection timed out (Connection timed out)
at Method)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(


Hi @dudoan1234,

In order for me to recreate and investigate the issue you are seeing. Can you please use twurl to execute the endpoint and copy/paste the request and response below? Thanks!

$ twurl -H "/2/accounts/18ce5475gij/scoped_timeline?scoped_to=none" | jq
  "data": [
      "created_at": "Fri Sep 29 21:09:52 +0000 2017",
      "id": 913873484375253000,
      "id_str": "913873484375252992",
      "text": "",
      "truncated": false,
      "entities": {
        "hashtags": [],
        "symbols": [],
        "user_mentions": [],


Thank for trying to help me. I found the problem in my source code. It is not problem of API. So, I will close this question here. Anyway, thank you very much.