Use PM2 CLI on Hero

I am trying to use pm2 on Heroku. I looked at the documentation here: http://pm2.keymetrics.io/docs/usage/use-pm2-with-cloud-providers/#heroku-google-app-engine-azure

It looks like the application works fine after deployment. And the logs show that multiple instances are running on 2X dyno.

However, when I run: heroku run bash and do pm2 ls I get an empty list:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ App name β”‚ id β”‚ mode β”‚ pid β”‚ status β”‚ restart β”‚ uptime β”‚ memory β”‚ watching β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

And I can not use any CLI pm2 functions.

I understand that when I make the heroku run command, a one-time speaker is created on the fly, and the pm2 instance running on this dino does not start any process.

However, I do not see how I can access pm2 on a specific dyno.

Can i use pm2 cli on Heroku?

+6
source share
1 answer

As mentioned in Heroku docs,

your application extends to many speakers

As a result, there is no application in which the application runs, so I don’t see how you can do what you want.

Heroku docs explain this a bit more.

+1
source

All Articles