So I have a Nodejs app that I need to deploy onto Heroku as production. I have a Procfile, which specifies to run 3 web processes. Only one of them gets run on Heroku:
The rest don't get run. I think what happens is my production environment doesn't get recognized for some reason. Here's the foreman log:
[ec2-user <at> ip-10-0-1-249 NodeApps]$ foreman start
16:48:35 web.1 | started with pid 4545
16:48:35 web.1 | started with pid 4546
16:48:35 web.1 | started with pid 4547
16:48:35 web.1 | Started process pid: 4545
16:48:35 web.1 | Started process pid: 4546
16:48:35 web.1 | Started process pid: 4547
16:48:35 web.1 | info: socket.io started
16:48:35 web.1 | { domain: null,
16:48:35 web.1 | _events:
16:48:35 web.1 | { request: [Function],
16:48:35 web.1 | connection: [Function: connectionListener],
16:48:35 web.1 | clientError: [Function],
16:48:35 web.1 | error: [Function],
16:48:35 web.1 | upgrade: [Function],
16:48:35 web.1 | close: [Function],
16:48:35 web.1 | listening: { [Function: g] listener: [Function] } },
16:48:35 web.1 | _maxListeners: 10,
16:48:35 web.1 | _connections: 0,
16:48:35 web.1 | connections: [Getter/Setter],
16:48:35 web.1 | _handle:
16:48:35 web.1 | { fd: 18,
16:48:35 web.1 | writeQueueSize: 0,
16:48:35 web.1 | onconnection: [Function: onconnection],
16:48:35 web.1 | owner: [Circular] },
16:48:35 web.1 | _usingSlaves: false,
16:48:35 web.1 | _slaves: [],
16:48:35 web.1 | allowHalfOpen: true,
16:48:35 web.1 | httpAllowHalfOpen: false,
16:48:35 web.1 | timeout: 120000,
16:48:35 web.1 | _connectionKey: '4:0.0.0.0:5001' }
16:48:36 web.1 | mongodb://10.61.2.112/portal
16:48:36 web.1 | mongodb://10.61.2.112/portal
16:48:36 web.1 | connection error: { [Error: Trying to open unclosed connection.] state: 2 }
16:48:36 web.1 | connection error: { [Error: Trying to open unclosed connection.] state: 2 }
16:48:36 web.1 | connection error: { [Error: Trying to open unclosed connection.] state: 2 }
16:48:36 web.1 | Listening on port 3000...
16:48:36 web.1 | DB Connection Open!
16:48:36 web.1 | DB Connection Open!
16:48:36 web.1 | DB Connection Open!
^CSIGINT received
16:48:39 system | sending SIGTERM to all processes
16:48:39 web.1 | exited with code 130
As you can see, it keeps using my local mongodb connection string. Here's my env:
What am I doing wrong? Please help me, and feel free if you need any more info.
You received this message because you are subscribed to the Google Groups "Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to heroku+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org