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 upthread safe? #354
Comments
This comment has been minimized.
This comment has been minimized.
|
I'm somewhat skeptical that:
To me, it looks like the error is occurring in
If you receive the same error in both of these configurations, that would be surprising to me. If you receive different errors in these configurations, that would shed more light on the nature of this issue. Thanks! |
sferik
referenced this issue
Feb 28, 2013
Closed
ruby 2.0.0 update_with_media raising Errno::EPIPE: Broken pipe #357
This comment has been minimized.
This comment has been minimized.
veesahni
commented
Mar 1, 2013
|
Thanks Erik - I'll give these options a try and see if I can narrow it down further |
This comment has been minimized.
This comment has been minimized.
joekain
commented
Mar 9, 2013
|
I've seen the same problem with a single threaded app. I'm using:
I tried suggestions 1 and 3 but the problem still reproduced. Suggestion 2 failed differently:
|
This comment has been minimized.
This comment has been minimized.
|
@joekain to get 2 working, you need to add Anyway, I think this proves that the issue is not related to threading and is likely not a problem with this library. |
sferik
closed this
Mar 9, 2013
This comment has been minimized.
This comment has been minimized.
jfredson
commented
Mar 20, 2013
|
Just wanted to chime in that I had the same issue and #2 fixed this for me. More specifically in my case I was able to track down the issue to the following Twitter searches: 1.) Twitter.search("Thrill Me (Original Mix)") #works fine Working fine now that I've changed the default http adapter. |
This comment has been minimized.
This comment has been minimized.
jfredson
commented
Mar 20, 2013
|
Hmmm, this doesn't seem to be applying to my rails console. Where would you apply that patch in order to get it to apply for both the server and the console? I put it in my application controller. |
veesahni
referenced this issue
Mar 20, 2013
Closed
getting -sometimes- Twitter::Error::ClientError: end of file reached #370
This comment has been minimized.
This comment has been minimized.
veesahni
commented
Mar 20, 2013
|
I was experiencing EOF errors every 30 mins or so since last night. I've switched to the typhoeus adapter, per @sferik's option 2 above and things have been quiet for the last 2 hours. |
This comment has been minimized.
This comment has been minimized.
BobWalsh
commented
Mar 20, 2013
|
you might want to see #370 (comment) |
This comment has been minimized.
This comment has been minimized.
BobWalsh
commented
Mar 20, 2013
|
after adding gem 'typhoeus', pasted code from solution 2 above and ran: thetweets = Twitter.search('1git', :count => 10, :lang => "en", :result_type => "recent") and got: 10 minutes before, same request had got the end of file error. |
This comment has been minimized.
This comment has been minimized.
richhollis
commented
Mar 21, 2013
|
When switching to typhoeus do you have to do all of the steps in #2? I just did step 2, switching the middleware and then got this error: typhoeus: disable_ssl_peer_verification is invalid |
sferik
referenced this issue
Mar 21, 2013
Closed
Got "Faraday::Error::ConnectionFailed: end of file reached" instead of Twitter::Error::NotFound #373
This comment has been minimized.
This comment has been minimized.
graemecoleman
commented
Mar 21, 2013
|
Apologies for the noobie question but, as someone who has limited experience of middleware, can someone help me to identify where the custom middleware stack in code example (2) should be placed in Rails (3.2.7) and, once it has been added, if anything else has to be done (e.g. I get a similar error to @richholis when I try to add the code to my initializer (where my keys are) in Thanks! |
This comment has been minimized.
This comment has been minimized.
BobWalsh
commented
Mar 21, 2013
|
What worked for me is adding the typhoeus gem to my gem file, and the code to my config/initializers/twitter.rb file that has my twitter credentials. May not be the "right" way to do it, but it works. Bob Walsh On Thursday, March 21, 2013 at 11:25 AM, Graeme C wrote:
|
This comment has been minimized.
This comment has been minimized.
richhollis
commented
Mar 21, 2013
|
@BobWalsh @c0ley - I added mine to config/initializers/twitter.rb too but I still get that error. From reading all of these issues, I sort of got the impression that we aren't still 100% sure if this change does actually resolve the problem? Is there still a possibility something has changed on the twitter side because our project runs queries for several different users and has been running flawlessly for the past few months and then starts throwing out these errors yesterday. No other gems have been updated or changed so I do find myself wondering what has changed and if it is on the twitter side. |
This comment has been minimized.
This comment has been minimized.
graemecoleman
commented
Mar 21, 2013
|
Thanks @BobWalsh - adding the code there seems to work, although I agree it might not be the "right" way to do it. A word of warning, however - if you're using Typhoeus > 0.5.0 (i.e. the latest version), you need to add the following to the top of the file:
More details at typhoeus/typhoeus#226 Now to check it deploys correctly! Thanks all! |
This comment has been minimized.
This comment has been minimized.
natarius
commented
Mar 21, 2013
|
did 1. and 2. and it now seems to work |
This comment has been minimized.
This comment has been minimized.
richhollis
commented
Mar 21, 2013
|
Thanks @c0ley - adding the require line does resolve the "typhoeus: disable_ssl_peer_verification is invalid" error. |
This comment has been minimized.
This comment has been minimized.
richhollis
commented
Mar 22, 2013
|
My nightly batch which failed past two nights just ran with 1. and 2. patched and no errors at all seen. |
This comment has been minimized.
This comment has been minimized.
c0ri
commented
Mar 23, 2013
|
I'm seeing this issue too. my setup as is: btw.. here's the code doing it for me: if Twitter.list_member?(MY_TWITTER_SCREEN_NAME, "bots", user_id) |
veesahni commentedFeb 22, 2013
I'm using the twitter gem within sidekiq to issue a number or parallel requests to twitter and see intermittent client errors. Although I get around this by retrying, I'm trying to better understand what's going on
There have been some discussions on multi threaded problems with Faraday:
lostisland/faraday#181
lostisland/faraday#204
The referenced pull request is not included in the latest 0.8.5 release of Faraday.
So, I'm wondering if the twitter module is thread safe for usage in sidekiq?
/cc @mperham