Skip to content

Starting Pm2 in auto cluster mode #38

@shaunakv1

Description

@shaunakv1

Hello,

I am using the v8.9.4 node image. I am trying to figure out how to get pm2 to start in built-in cluster mode. If I scale up my app service plan I can actually have more CPU. I want to get pm2 to spin up more clusters. this command pm2 start app.js -i max auto detects the number of CPUs and spins up right number of node instances.

This should in theory be transparent to the web app. I tried to spin up the cluster manually by running that command straight in console, and they spin up alright. Also use up CPU much better.

How can I use the current container to start my application using pm2 in cluster mode?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions