Skip to content

Clustering not working with Bun #5893

@harryqt

Description

@harryqt

What's going wrong?

Clustering do not work with Bun. 😕

How could we reproduce this issue?

The following spawns forked instead of cluster:

pm2 start --interpreter /opt/homebrew/bin/bun --instances 2 ./build/index.js
Screenshot 2024-09-18 at 7 50 31 PM

Supporting information

--- PM2 report ----------------------------------------------------------------
Date                 : Wed Sep 18 2024 14:47:12 GMT+0530 (India Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.4.2
node version         : 20.17.0
node path            : /Users/harry/.bun/bin/pm2
argv                 : /opt/homebrew/Cellar/node@20/20.17.0/bin/node,/Users/harry/.bun/install/global/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : harry
uid                  : 501
gid                  : 20
uptime               : 7min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.4.2
node version         : 20.17.0
node path            : /Users/harry/.bun/bin/pm2
argv                 : /opt/homebrew/Cellar/node@20/20.17.0/bin/node,/Users/harry/.bun/bin/pm2,report
argv0                : node
user                 : harry
uid                  : 501
gid                  : 20
===============================================================================
--- System info --------------------------------------------
arch                 : arm64
platform             : darwin
type                 : Darwin
cpus                 : Apple M2
cpus nb              : 8
freemem              : 313901056
totalmem             : 17179869184
home                 : /Users/harry

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions