Ecosystem File with dynamic process name with cluster mode
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
I need to name my processes dynamically according to their indexes in cluster mode.
How could we reproduce this issue?
I have a process that is called "app" and I instantiate it with an ecosystem file like so:
module.exports = {
apps : [{
name : "app",
script : "./app.js",
merge_logs: true,
instances : "-1",
exec_mode : "cluster"
}]
}
What I wanted to do is that PM2 instantiated each of the "app" instances with a different name on the logs and not all with the same name. Like app1, app2, app3, and so on. Is it possible?
Supporting information
pm2 version : 3.5.1
node version : 12.13.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides an ecosystem configuration and app.js as the reproduction. Start by checking how PM2 handles name and instances in cluster mode, then determine whether per-instance names are supported. Done would be a documented or implemented way to produce distinct names such as app1, app2, and app3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100