Cannot change dynos on Heroku dashboard - heroku

After having used the Heroku server successfully many times now I am consistently getting this error:
at=error code=H14 desc="No web processes running" method=GET path="/" host=rand-dyl-test.herokuapp.com request_id=b900df9f-c6cc-4b5e-a776-aff2ce92fd35 fwd="134.117.121.232" dyno= connect= service= status=503 bytes= protocol=https
From what I understand this is something related to the dynos, but I cannot adjust these in the configuration on oTree hub or from the dashboard on Heroku.
I have tried some things that I saw suggest online regarding the Procfile but this is, frankly, over my head. I am really at a loss for what to do next. Does anyone have any ideas?

As you are mentioning the Procfile, you may find it very useful to create one to see if that fixes the part of No web processes running.
A Procfile are just the commands your Dynos are going to execute in order to boot up your program, you can create one by just naming it “Procfile” and placing it on the root of your project folder.
For example, if you have a Node.js app or similar:
Worker: npm run deploy
This will create a Worker Dyno that deploys the app whenever a new version is created.
You may also need to manually activate your Dyno on your Dashboard to make sure it is running.
You can read more about the Procfile here

Related

Why isn't my Heroku hosting discord bot going online?

[Hello, i am a complete cookie to coding so need some help.
I made a discord ModMail Bot using this repository(https://github.com/kyb3r/modmail) and used heroku to deploy the worker. Everything worked out and bot was working smoothly, but today it went offline, and when i tried restarting the worker, this messages show up. PLease help.]Code error
Your bot does not stay permanently online when using heroku.
You'll have to wait until the bot eventually comes online, or pay for more dyno hours, which at this point, you could just host your bot on a VPS

My bot is staying online even after I've shut down all possible hosts

Today I noticed that my bot was sending double messages (usually means that it's running 2 clients). After I shut down my bot from heroku, it was still online. Any idea how can I fix this?
Check if you are running the bot locally, and make sure all servers linked to the bot are turned off, sometimes the bot takes a while to completely shut down and go offline in discord, so try waiting for a few minutes.
in Heroku => navigate to resources tab and turn off npm worker: start

Deploying TelegramBot(Rust) using Heroku

Okay to start with-
I am building a Telegram bot for scanning my location for covid vaccine availability.
The source code is available here
The program works fine on my PC and I wanted to upload it on a server.
So I found a tutorial online to upload python-based web apps to Heroku to get insight into Heroku.
I made the mistake of creating a python environment for a rust app(forgive me, I am just a beginner).
Then I fixed it by undoing the changes to the best of my knowledge.
Then I learned that Rust requires a buildpack and then I implemented it(hopefully).
Then finally I learned of the importance of Procfile and made this (I really hope I didn't get the Procfile wrong).
release: export TELOXIDE_TOKEN=*********
release: export CHANNEL_ID=********
release: export OWNER_ID=*********
release: cargo run
I dint create a "web" process type cuz I think it's only needed when you have a web interface or require Heroku to accept from one.
A Heroku app’s web process type is special: it’s the only process type that can receive external HTTP traffic from Heroku’s routers. If your app includes a web server, you should declare it as your app’s web process.
got this from the documentation
Now the problem is that Heroku is showing me this error code while I try to open the app.
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
I figured this was because I was not using any web interface.
Then I checked the log files and this happened
2021-05-23T13:35:09.287511+00:00 heroku[router]: at=error code=H14 desc="No web processes running"
method=GET path="/favicon.ico" host=pure-stream-48197.herokuapp.com request_id=8859d568-2f24-4f83-
b9c8-45e8603a373a fwd="116.68.99.130" dyno= connect= service= status=503 bytes= protocol=https
I tried specifying dyno
and also rechecked my "P"rocfile's extension"no extension"
I am getting the fundamentals wrong somewhere and not sure what I am doing wrong.
Thank you for helping me out
You need to run a worker: dyno.
Please update your Procfile to the following content.
release: export TELOXIDE_TOKEN=*********
release: export CHANNEL_ID=********
release: export OWNER_ID=*********
worker: cargo run

Using actix-web with HTTP2 support in Heroku

I am trying to deploy one of the actix-web examples that offers HTTP/2 support in Heroku, after having slightly modified it to listen at the provided $PORT number, as well as the way in which certs are loaded -- rather than read from a file, it obtains the public and private key from the environment.
The problem is that, on each request, the Heroku router logs that the connection is closed without a response.
heroku[router]:
at=error
code=H13
desc="Connection closed without response"
method=GET
status=503
bytes=0
protocol=https
As it worked locally, I suspect the issue is at my dyno's configuration, which is a Hobby ($7/mo), especially at the certs section. As the application expects to receive the cert info from the environmental variables and having that Heroku does not provide you access to their certificates (e.g cert for xxxxx.herokuapp.com), I bought a domain name with the hopes of generating my own. I did, using the following page.
With a self-generated cert, I've tried so far the following, resulting in any of cases in the following errors:
To provide the same pair of keys to the dyno and application. The logs yield the error mentioned above.
Not to provide SSL configuration to the dyno, but to the application. Therefore, https access is disabled and the dyno is not even hit.
Not to provide certs configuration to the app, but to the dyno. The app crashes on boot time.
However, if I remove the related rustls lines, everything works smoothly, but the protocol used is HTTP/1.1.
Therefore, I'd like to kindly ask you:
Is there anything fundamentally bad about having the application expecting to load the certs?
Should I try other providers? (e.g DigitalOcean, AWS, Google Cloud)
Do you have any idea what might make it work in Heroku?
I've just found that Heroku does not support HTTP/2 at the time (source):
HTTP/2 is not currently supported on Heroku although this may change in future. You can find out about our currently supported HTTP protocols here: https://devcenter.heroku.com/articles/http-routing#http-versions-supported
For any future developments we recommend subscribing to the Heroku Changelog. This will let you know about updates, improvements and deprecations ahead of time so that you can make any necessary adjustments.

Slackbot + Heroku: Have to keep logging in

I'm having an issue with my botkit slack bot hosted on Heroku. The bot itself is just the "starter kit."
https://github.com/howdyai/botkit-starter-slack
After a little while, the bot stops working. The logs complain of not being able to find the team. I hit the /login path of my heroku-deployed app and allow it and it works again for a bit.
Is there a heroku configuration that I need to change to keep it from going idle or something? Or is this an issue with the starter kit? Could there be something I need to do in the slack configuration?
I am pretty sure that you run your bot on a hobby dyno. Heroku sends hobby dynos to sleep if they dont receive any requests.
What had happened:
You deployed the bot -> the bot is running and working
Everybody can write with the bot -> so great!
After a few minutes, while the bot is not used, the dyno falls asleep
At this moment the bot is not working
You hit the /login request and yeah -> the dyno starts again and the bot is running and working
Read more about free dynos here: https://devcenter.heroku.com/articles/free-dyno-hours.
Solution: Switch to Standard Dynos

Resources