Long delay on omniauth callback
OmniAuth (Facebook and LinkedIn) has been working for me for several months.
Without changing the code, I started to linger on the callback from Facebook / LinkedIn for a very long time.
It now takes about 40 seconds:
Started GET "/auth/facebook/callback?state=e600c4acbb0e10f40....
in
Processing by AuthenticationsController#create as HTML....
I saw the question , but the resolution didn't work for me.
Has anyone seen this? How can I solve this problem / figure out what's going on?
- EDIT 1 -
I ran a curl thread and found the calls to Facebook take a very long time:
time curl --data "grant_type=authorization_code&client_id=[MY CLINET ID]&client_secret=[MY CLIENT SECRET]&redirect_uri=[MY REDIRECT URI]&code=[THE CODE I GOT]" https://graph.facebook.com/oauth/access_token
>> access_token=AAAA....ZDZD&expires=5183693
real 0m20.459s
user 0m0.004s
sys 0m0.008s
time curl -H "Authorization: Bearer AAAA....ZDZD" https://graph.facebook.com/me
>> {....}
real 0m20.706s
user 0m0.012s
sys 0m0.008s
- EDIT 2 -
It seems like each curl call takes 20 seconds longer than it should. I've tried with google:
time curl http://www.google.com
>> <HTML>....</HTML>
real 0m20.253s
user 0m0.012s
sys 0m0.004s
but when i try with IP:
time curl http://173.194.44.17
>> <HTML>....</HTML>
real 0m0.647s
user 0m0.012s
sys 0m0.000s
I found a clue on some website that might have to do with slow DNS resolution. The browser on the same computer works fine.
Any ideas?
+3
source to share