Comments (7)
Heroku kills web apps if they don't respond to $PORT in 60 seconds. see: https://devcenter.heroku.com/articles/error-codes#r10-boot-timeout
I would just write a simple cowboy process that listens to and set to port to System.get_env('PORT') || 4000
This is all you need to add: https://github.com/joshrotenberg/elixir_cowboy_examples/tree/master/apps/hello_world
Just change the port.
That should work.
from hedwig.
@meatherly thanks for the tips!
I know about the "web" process specificities, but it amazes me that heroku forces you to create a useless web process just to let other dynos live.
From what I read here https://devcenter.heroku.com/articles/run-non-web-java-processes-on-heroku it seems we could run whatever long-running process without any web process.
Thoughts?
from hedwig.
@docteurklein is there a reason why you cannot use a worker process? I have an elixir chat bot running as a worker on heroku that has stayed alive for months now without a web process.
My Procfile:
worker: mix run --no-halt
This is not a hedwig app, but I cannot imagine that deploying to heroku would be much different.
from hedwig.
@bbrock25 thanks for the feedback
I tried at first to define a worker process only, but didn't get it to work.
What does your Procfile look like, and how are you starting it?
I tried with
bot: mix run --no-halt
and then push to deploy.
from hedwig.
EDIT: i just tried to run it with heroku scale bot=1
and it seems to work. Still not sure why it doesn't at git push.
from hedwig.
You probably needed to turn the worker on before it would automatically deploy. I'd imagine that deploying with git push should be fine now.
from hedwig.
@bbrock25 thanks!
I didn't notice you added your Procfile, sorry to ask again how it looked like.
Anyway, I guess I can close this issue now?
from hedwig.
Related Issues (20)
- Support multiple configurations of the same adapter HOT 1
- Hedwig.whereis/1 not working HOT 2
- Can't compile responder when there are chinese characters in regular expression HOT 4
- Document return values from `handle_in/2`
- What is the recommended alternative to `ignore_from_self?` HOT 2
- how to test responders? HOT 2
- Process registration: `handle_connect` not being called? HOT 3
- Double supervision HOT 1
- Make Robot a real OTP behaviour HOT 4
- Making a tutorial / howto regarding adapters HOT 6
- A single message can trigger multiple responses HOT 6
- Crash when trying to create a secure connection HOT 3
- enter responder macro HOT 4
- hot code reload responders when in dev mode
- Use up and down arrows for history in console adapter HOT 1
- Reconnect does not work HOT 7
- `hedwig` package published on hex is out of date HOT 3
- Defining adapter-dependent actions HOT 2
- Support multiple AKA fields
- Ability to listen but not respond HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hedwig.