Skip to content

Latest Socket.io and pm2 causing issues when using -i max #637

@DPerkunas

Description

@DPerkunas

When I launch my app.js file via pm2 start app.js -i max I get the following error on client end
" failed: Connection closed before receiving a handshake response "

when I launch the app.js via "pm2 start app.js" it works fine.

I utilize socket.io in my application on apache. The error logs are empty, but I do notice that it emits a console.log("hello world"); twice upon start from each start up on each of the cores. The websocket then keeps connecting and disconnecting.

One thing I think it could be, is that it's supposed to be "stateless", and I hold a list of online users in users = {};

But why would it work when it's only one CPU vs 4?

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