Page History
...
First, is by adding the "exec_mode" and "instances" settings to your JSON configuration as follows. The "exec_mode" setting enables cluster mode, while the "instances" setting allows you to customize how many CPUs are available to PM2 ("max" = all CPUs, but you also can specify a number.)
Code Block language js title dspace-ui.json { "apps": [ { "name": "dspace-ui", "cwd": "/full/path/to/dspace-ui-deploy", "script": "dist/server/main.js", "instances": "max", "exec_mode": "cluster", "env": { "NODE_ENV": "production" } } ] }
Then, start (or restart) your site as normal (e.g.
pm2 start dspace-ui.json
)Alternatively, you can pass in the "-i" flag with either "max" or a number to tell PM2 to run in cluster mode across that many CPUs:
Code Block # Start the "dspace-ui" app & cluster it across all available CPUs pm2 start dspace-ui.json -i max
...
Overview
Content Tools
Apps