getting Net::OpenTimeout: execution expired only sometimes - ruby-on-rails

My rails application sends emails through a gmail account using mailer. Till recently everything was working fine. But now sometimes I get the error as
"Net::OpenTimeout: execution expired"
This happens sometimes and sometimes it works. I want to know the reason for this behavior. Is it because of the gmail server having load balancing issues or is it because of some configuration issues in the rails app?

Related

Mails not sent in production side rails 4

I have a rails app with one form. After saving that form all data will be send in an email id. Form is working great in development side. But after deploying the app it doesn't work. It's giving the following error in the browser.
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
In this application I have another contact us form. That form work fine after deployment in production side.

Logging in with Facebook and Linkedin is inconsistent

I am working on a Rails application that uses omniauth facebook and linkedin login. It's been working for months, and today we are suddenly having crazy problems logging in / signing up on production (Heroku). I assumed that the problem was on our end, but we have not pushed new code to production in 4 days.
After hours of trial and error, we realized that about half of the time, we are able to login, maybe another 40% of the time we are redirected to the sign in page from linkedin / facebook, and the rest of the time we get an application error with elastic search that I assume results from the insanely long load time. Additionally, when the app renders the login page, in the logs there are "expired token" type errors, which is weird because sometimes it actually works.
I'm assuming that Facebook and Linkedin are not both broken. Does anyone have any feedback on other points of failure that I might look into.
Well, restarting the dyno seems to have fixed the problem.

How do I get the server logs for a Rails 4 application in development?

I am using Devise and it sends out a confirmation email when a new user account is created. Since I am in development, in localhost, it doesn't really send out the email, so I just copy the confirmation link from the server info that appears on the console.
The thing is, as one particular page grew, the amount of information that the server processes after the email is sent became too large for the terminal, the backscroll ends before I reach the link. I checked /log/development.log but it logs other things. I studied the config and debug parts of the rails doc but I couldn't find anything about server logging.
So now I have no way of copying the confirmation link from the console, and no way of confirming new accounts, which I still need to do since it is part of the proposed flow.
How can I get the server logs?

heroku mailer with google apps telling me to sign in via web browser

I setup google apps and heroku to send mail. I sent the first mail from within my app and everything is great. Then, I changed the email on my google apps account (from matt#website.com to team#website.com)...made sure to change it in heroku config settings...restarted...but now it gives me this error:
Net::SMTPAuthenticationError (535-5.7.1 Please log in with your web browser and then try again. Learn more at
I tried logging in via the web browser and everything is fine. I just keep getting this same error when I try to send mail now.
This should help: http://www.rocketideas.com/2012/05/gmail-error-password-not-accepted-from-server-solved/
I've tested it and it works for me.

Net::SMTPUnknownError (could not get 3xx (550)) error when sending email on my Rails app

I'm using google for sending emails on my Rails 3.2 app. Most emails functions were working perfectly. Then I did some testing because delayed_job is not working. I got a warning from google that I need to log into the account via the web to unlock it (I sent about 20 emails in a span of 1 hour). Things were back to normal. Now, I am unable to send any emails whatsoever. I have this error message in my server log:
Net::SMTPUnknownError (could not get 3xx (550))
Has Google blacklisted me for sending 50 emails? I changed the password on the account, logged in a few times via the web, restored the settings to exactly what they were when the emails were working.
I got email working again by creating a new email address. Had to create a new one without using an alias for the old one to get it to work. I also created an SPF record entry, which I did not have before.

Resources