This is what my'keepalive_timeout' lines look on my nginx.conf file but still have time out issues when users login with twitter oauth. 503 shows before 120 seconds.
sendfile on;
#tcp_nopush on;
#keepalive_timeout 120;
keepalive_timeout 120;
#gzip on;