REST API Connect Timeouts


I am seeing consistent request timeouts when trying to hit user or search api endpoints. The client is written Ruby using twitter gem(

On debugging, I found out that the gem has a default open_timeout set to 5 seconds. I tried increasing this to 30 secs, but still didnt get any response from twitter.

These timeouts started happening around 6-7 PM UTC, Saturday(Oct 18th)


Are you able to share any simple code that repeatedly demonstrates the issue?


I am using the twitter gem.

twitter = do |config|
  config.consumer_key = TwitterConfig::CLIENT_ID
  config.consumer_secret = TwitterConfig::CLIENT_SECRET
  config.access_token = handle.access_token
  config.access_token_secret = handle.access_secret

for i in 1..100
  begin"Hello", {:count => 1})
  rescue Exception => e
    p "Error^^^^^^^^^ #{e.message}"

This loop failed 6-7 times with “Execution Expired” message and this happens consistently on every run.


time curl --get ‘’ --data ‘count=1&q=%22twitter%22’ --header ‘Authorization: OAuth oauth_consumer_key="<>", oauth_nonce="<>", oauth_signature="<>", oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1413706835”, oauth_token="<>", oauth_version=“1.0”’

real 2m7.476s
user 0m0.020s
sys 0m0.132s

real 2m7.478s
user 0m0.048s
sys 0m0.116s


Not sure if this will help, but all my servers are hosted in aws and are in us-east-1a zone