1

I have an app where a user can login using github. When I log in, the app hangs for about one minute. This is the log

Started GET "/" for 177.97.171.165 at 2013-08-11 15:26:01 +0000
Started GET "/sessions/new" for 177.97.171.165 at 2013-08-11 15:26:03 +0000
Started GET "/auth/github" for 177.97.171.165 at 2013-08-11 15:27:03 +0000
(github) Request phase initiated.
Started GET "/auth/github/callback?code=ade18bb431c9303c6274&state=deaf138aff766c6ec3480a54897ae8bbbe734e0dfe11790d" for 177.97.171.165 at 2013-08-11 15:27:05 +0000
(github) Callback phase initiated.
Started GET "/" for 177.97.171.165 at 2013-08-11 15:28:06 +0000

In the last line, I was successfully logged in. If I access the app using the IP instead of the domain, this doesn't happen, there is no one minute delay on requisition. Has anyone seen something like this?

I'm using nginx 1.4.1 on ubuntu 13.04

my config

nginx.conf

user www-data;
worker_processes 1;
pid /run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 30s;
    types_hash_max_size 2048;
    # server_tokens off;

    server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # nginx-naxsi config
    ##
    # Uncomment it if you installed nginx-naxsi
    ##

    #include /etc/nginx/naxsi_core.rules;

    ##
    # nginx-passenger config
    ##
    # Uncomment it if you installed nginx-passenger
    ##

    #passenger_root /usr;
    #passenger_ruby /usr/bin/ruby;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

app.conf

upstream chathub { server 127.0.0.1:49153; }
server {
  listen      80;
  server_name chathub.us;
  location    / {
    proxy_pass  http://chathub;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    #proxy_pass_header Content-Length;
  }
}

I don't know if I made my problem clear...if someone need more info/files, I can post them

Edit
The output from the lookups

root@chathub:~# nslookup www.github.com
Server:     8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:   www.github.com
Address: 204.232.175.90

root@chathub:~# nslookup www.google.com
Server:     8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:   www.google.com
Address: 74.125.226.208
Name:   www.google.com
Address: 74.125.226.210
Name:   www.google.com
Address: 74.125.226.211
Name:   www.google.com
Address: 74.125.226.212
Name:   www.google.com
Address: 74.125.226.209
Luiz E.
  • 111
  • 6

0 Answers0