Local auth times out on Heroku, works fine locally

35 views
Skip to first unread message

Ben Ng

unread,
May 15, 2013, 7:05:50 PM5/15/13
to ged...@googlegroups.com
This one has me stumped. Local auth works fine on my mac, but on Heroku the request times out after I submit the login form (at the `/auth/local` endpoint).

I went into `helpers/passport/actions.js` and smacked a `console.log()` in the first line of `this.local()`, but got no output in my logs.

The /auth/local endpoint doesn't appear in my logs anywhere either.

Interestingly, just visiting the /auth/local endpoint (via GET) gives me the "consider using POST" instead error message, so it isn't totally hopelessly broken.

I'm not sure how Geddy handles requests -- I want to just smack debug statements down the entire chain until I figure out where things are going wrong. Some help identifying this chain would be great!

Thanks

Matthew Eernisse

unread,
May 15, 2013, 10:00:40 PM5/15/13
to ged...@googlegroups.com
Fucking Heroku.

I'm not sure about the logging, but you could instead try using geddy.log.info and see what shows up in your logs.

The local auth stuff is actually super-simple. All it does is check the local User model to match username/pass.

Maybe bcrypt didn't get built properly?


M.

Ben Ng

unread,
May 16, 2013, 1:46:47 AM5/16/13
to ged...@googlegroups.com
Alright I'm at my wits end. Nothing is being logged. Even when I remove all the code in actions.local() the request times out. The problem must be somewhere else then, and I have no clue where.

bcrypt was last updated 2 months ago and it's been building just fine as auth still worked on 0.7 up until last week (last i checked).


Deployment:
heroku create
heroku config:set NODE_ENV=production
heroku addons:add mongohq:sandbox

Then just go to the login page and hit submit. Ta-da.

The only log output is this:
heroku[router]: at=error code=H12 desc="Request timeout" method=POST path=/auth/local host=peaceful-sierra-1984.herokuapp.com fwd="169.229.108.45" dyno=web.1 connect=1ms service=30001ms status=503 bytes=0

Hopefully this will help pinpoint the problem. Now, I need to find me some pizza... ;)

Matthew Eernisse

unread,
May 17, 2013, 12:20:15 AM5/17/13
to ged...@googlegroups.com
A method of last resort might be to insert "throw new Error('WTF');" in your code to see how far it gets before failing. This is sort of an awful debug technique of last resort, but will work ... like old fashioned IE 'alert' debugging used to work.
Reply all
Reply to author
Forward
0 new messages