Closed msenthilvel closed 9 years ago
How many copies of the TwitterStreamAgent do you have deployed in your instance? Twitter's API service sends back an Error 420 (Enhance Your Calm) when you're being rate limited: https://dev.twitter.com/rest/public/rate-limiting
If you can, fold your TwitterStreamAgent instances into a single instance, feed the event stream into a copy of EventFormattingAgent to build messages of whatever kind you need, and then feed the event stream into one or more instances of TriggerAgent to sort them.
Mmm, that's weird as I was running only one TwitterStreamAgent. Is there anything else that can potentially cause huginn to be rate limited by twitter? Also, I will restart my huginn instance through foreman start again and let you know if I could track the error more precisely, Thanks!
@msenthilvel also make sure you just have one threaded worker running. I am getting 420 errors when I use the same twitter credentials locally in development and in production, the same probably happens if a old instance of the threaded worker did not shut down properly.
Thanks, that solved my problem. Seems like one of the old instance has been running in the background since I probably did not shut down the processes properly while trying to debug them. Thanks again! :)
Glad it works now :smile:
I added a "debugging Twitter" section to https://github.com/cantino/huginn/wiki/Configuring-OAuth-applications#debugging-twitter -- how's it look?
Now that the source of error is known, my twitter stream keeps hanging and on analysis (htop command) I could see more than one twitter_stream.rb process. Is there a way to restrict them from spawning more than once ? I've also confirmed that there is no process open while starting huginn in production, so pretty sure it isn't a old instance. Sorry to post it in an closed issue, thought it would be appropriate to post it in here.
Hey @msenthilvel, how are you starting / running Huginn?
wrote a init script that does the following in the order given: bundle exec unicorn -E production -c config/unicorn.rb bundle exec rails runner bin/schedule.rb bundle exec rails runner bin/twitter_stream.rb bundle exec script/delayed_job run All commands are run as a separate user 'huginn' with disabled login.
Is it possible that one of those processes is getting run more than once?
/cc @dsander
@msenthilvel Maybe your init script does not properly shut down the old processes before restarting the new version?
Hello, I am trying to deploy huginn as an alternative to yahoo pipes. I was able to deploy successfully after reading through several issues and following a guide posted for manual installation. However, for some strange reason twitter stream agent seems to exit/hang after few hours (2-3 hrs max) in production mode and am not able to get any feeds after that. Have also tried changing the procfile to use the old version instead of threaded version but that didn't solve this problem. Also when I stop the huginn service and then start them through "foreman start" to check for errors I found a weird line "Twitter error: Invalid Status code 420". Is it in anyway connected or am I doing something wrong? any info would be really helpful.