I'm trying to use pm2
on Heroku. I did have a look at the documentation. It looks like the application works fine once deployed, and the logs indicates that multiple instances has started on a 2X dyno.
Yet when I run: heroku run bash
and do a pm2 ls
I get an empty list:
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
And I can't use any pm2
CLI functions. I understand that when I do a heroku run
command a one-off dyno is created on the fly and the pm2
instance running on this dyno does not run any process.
However I don't see how I can access pm2
on a specific dyno.
Is there any way to take advantage of the pm2
cli on Heroku?