Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Binding to port #19

Closed
jakeboyles opened this issue Jul 28, 2016 · 20 comments
Closed

Binding to port #19

jakeboyles opened this issue Jul 28, 2016 · 20 comments

Comments

@jakeboyles
Copy link

I used the deploy to heroku button and am getting a problem with it not being able to bind to port. Am I missing something?

@jakeboyles
Copy link
Author

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

@chris-j-major
Copy link
Contributor

Hi jakeboyles - I don't think it should bind to a port - it doesn't provide a web interface.

@jakeboyles
Copy link
Author

I didnt think so either but for some reason its crashing my app on heroku

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

Ah I had this - are you using a free dyno?

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

I think there's a problem with Heroku where free dynos for nodejs apps can't be of the worker type.

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

Thanks for bringing this up - I will investigate now.

@jakeboyles
Copy link
Author

Yeah im using the free dyno. I was just going to wrap an express server around it and keep hitting the route with pingdom...

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

@jakeboyles yeah I actually considered doing that before I upgraded to a hobby dyno (which I was going to do anyway) - seems wasteful but it genuinely seems to be a Heroku limitation/bug.

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

If you initialise an express server you won't need to pingdom though

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

Just having it listening is enough

@jakeboyles
Copy link
Author

I figured out what to do.
screen shot 2016-07-28 at 5 17 36 pm

@jakeboyles
Copy link
Author

That solved it. So you can use the free dyno you just need to switch your worker.

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

Interesting, I didn't have the option to do that when I tried - but I'd accidentally initialised the Procfile with only a web worker defined so maybe it 'stuck' that way.

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

Thank you very much for your solution - I'll add it to the README.

@chris-j-major
Copy link
Contributor

If it's non-intuitive, perhaps we could put an small express server there - we could even serve up stats from it...

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

@chris-j-major that's a good extension, especially if paired with a nice frontend
you could even put Niantic server status there!

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

@jakeboyles let me know if it works now this is resolved!

@kmoe kmoe closed this as completed Jul 28, 2016
@jakeboyles
Copy link
Author

Yeah, its working fine now. I think ill still hit the sleeping issue though.

@jakeboyles
Copy link
Author

Unless the constant polling of the api solves that, so it might not sleep...

@kmoe
Copy link
Owner

kmoe commented Jul 28, 2016

Yeah, I expect you'll just end up using up your free dyno hours while the app is running.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants