Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upGetting Twitter::Error::ClientError: execution expired #401
Comments
This comment has been minimized.
This comment has been minimized.
|
Sounds like your requests might be timing out. Perhaps try adjusting the request timeout settings in your connection options to see if that makes a difference? Twitter.configure do |config|
config.connection_options = Twitter::Default::CONNECTION_OPTIONS.merge(:request => {
:open_timeout => 5,
:timeout => 10
})
endWhat's above are the default values, you'll need to adjust them as you see fit. |
sferik
closed this
May 30, 2013
davesag
referenced this issue
Jun 22, 2013
Closed
I'm getting a lot of 'execution expired' errors when tweeting. #11
This comment has been minimized.
This comment has been minimized.
|
This is an issue with the Twitter API, not this library. |
This comment has been minimized.
This comment has been minimized.
|
Is everyone getting that on heroku or also elsewhere? |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
lyuzashi
commented
Jul 26, 2013
|
I've deployed some code to Heroku in the last hour using the Twitter Gem. It worked perfectly in development, responding within under a second. Could not get a response in production, just as described here. |
This comment has been minimized.
This comment has been minimized.
|
Still getting this. The Twitter API status page says nothing and identical code performs just fine in development. It might not be an issue with this library, but what is it an issue with? What are the rules that would cause the Twitter API to simply not respond? |
This comment has been minimized.
This comment has been minimized.
jeremyhaile
commented
Jul 26, 2013
|
I'm getting this a ton. And I'm on Heroku as well.I don't think the problem is with the Twitter gem, but Twitter's API status page says everything is ok, but I'm getting this error MANY times a day. Anyone have ideas or workarounds? |
This comment has been minimized.
This comment has been minimized.
|
@jeremyhaile Try using the Proximo add-on to proxy your requests via a static IP. I switched to this a few hours ago and haven't had the problem since, but that might just be luck. I configured the Twitter gem to use Proximo like this:
I configured Omniauth (because I was using oAuth too, and that also had timeouts) like this:
Good luck. The fact I was having Omniauth problems shows it isn't the gem specifically. Unfortunately. |
This comment has been minimized.
This comment has been minimized.
jeremyhaile
commented
Jul 26, 2013
|
@jalada any idea why you'd need to switch to Proximo? That would be a pretty expensive add-on for us. I'd much rather find a solution that doesn't require paying hundreds of dollars a month. |
This comment has been minimized.
This comment has been minimized.
|
For me the problem is really coming from EC2 heroku instances with certains IPs that might be limited or blacklisted by twitter. |
This comment has been minimized.
This comment has been minimized.
jeremyhaile
commented
Jul 26, 2013
|
By the way, given that this does not appear to be an actual Twitter gem issue, I've opened a stackoverflow question with tags heroku and twitter here: http://stackoverflow.com/questions/17883444/receiving-execution-expired-errors-on-twitter-from-heroku |
This comment has been minimized.
This comment has been minimized.
jeremyhaile
commented
Jul 26, 2013
|
@ys How do you know the IPs are limited or blacklisted? |
This comment has been minimized.
This comment has been minimized.
|
@jeremyhaile What @ys said. I'm hypothesising here, but I think Twitter have changed their blacklist rules and are now flatly ignoring requests from blacklisted IP addresses, and some of those are unfortunately Heroku IP addresses on EC2. This is the problem with IP-based blocking in the world of the cloud. If Proximo is expensive for you, run your own proxy on a server somewhere else, and proxy your requests through that. When I am certain using a proxy solves the issue I will be raising a bug with Twitter. |
This comment has been minimized.
This comment has been minimized.
|
@jeremyhaile it's like @jalada said exactly. And I don't know it I just suppose |
This comment has been minimized.
This comment has been minimized.
jeremyhaile
commented
Jul 26, 2013
|
@jalada ok thanks for the info. I've also reached out to Heroku about this and referred to these bug comments and the stack overflow question. |
This comment has been minimized.
This comment has been minimized.
abyx
commented
Jul 26, 2013
|
Having the same errors with this gem on heroku |
This comment has been minimized.
This comment has been minimized.
|
Support from heroku said they were looking internally and with twitter engineers… On 26 Jul 2013, at 18:23, Aviv Ben-Yosef notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
jeremyhaile
commented
Jul 26, 2013
|
Awesome - thanks for the update! On Friday, July 26, 2013 at 12:57 PM, Yannick Schutz wrote:
|
This comment has been minimized.
This comment has been minimized.
mkumarrails
commented
Jul 29, 2013
|
getting the same issue "Twitter::Error::ClientError: execution expired: frequently. |
This comment has been minimized.
This comment has been minimized.
karthikselva
commented
Jul 29, 2013
|
1.9.3-p448 :018 > Twitter.update("I'm tweeting with @gem!") It never succeds. |
This comment has been minimized.
This comment has been minimized.
jeremyhaile
commented
Jul 29, 2013
|
If you are having problems with this, please file a ticket with Heroku and and comment on this Twitter discussion: https://dev.twitter.com/discussions/20185 |
This comment has been minimized.
This comment has been minimized.
bcackerman
commented
Dec 14, 2013
|
Make sure you guys Twitter::Error, Timeout::Error => e |
This comment has been minimized.
This comment has been minimized.
jacqueline-homan
commented
Jan 5, 2014
|
I don't think this is a heroku issue. I am building an app right now that uses the Twitter gem that is NOT being deployed on heroku and I have the same exact problem in the test and development stage: Twitter::Error::ClientError: execution expired: |
sferik
referenced this issue
Jan 9, 2014
Closed
Twitter Gem and rescue in request': execution expired (Twitter::Error) #516
added a commit
that referenced
this issue
Jan 22, 2014
This comment has been minimized.
This comment has been minimized.
nozpheratu
commented
Mar 6, 2015
|
I'm running into this issue seemingly only on my development host. My Twitter client is connecting just fine on my production servers, I connect with the exact same keys in production as I do in development. Could twitter be blacklisting my IP? I handle the error, but it gets slightly annoying waiting for the Twitter client to time out every time I try to connect in development. Seems like the ability to specify a custom expiration time has been deprecated. |
This comment has been minimized.
This comment has been minimized.
|
@nozpheratu are you streaming or are these REST requests? If you are streaming, the following applies:
Either way, I'd recommend using environment specific credentials. |
This comment has been minimized.
This comment has been minimized.
nozpheratu
commented
Mar 6, 2015
|
@stve These are REST requests. I'm trying to access |
csph8 commentedMay 28, 2013
Getting this error Twitter::Error::ClientError: execution expired often & often