Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1116817 - multiple nodejs processes running in a gear
multiple nodejs processes running in a gear
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
2.1.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Luke Meyer
libra bugs
: Upstream
Depends On: 1077353
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-07 07:28 EDT by Brenton Leanhardt
Modified: 2014-08-04 09:27 EDT (History)
14 users (show)

See Also:
Fixed In Version: openshift-origin-cartridge-nodejs-1.24.3.5-1.el6op
Doc Type: Bug Fix
Doc Text:
Under certain race conditions or user actions, it was possible for multiple Node.js supervisor processes to be running for a Node.js cartridge. Because only one process could bind to the port, others would die, resulting in the supervisor continuously retrying to start them and consuming all of the gear's CPU. In addition to now checking whether a pidfile exists for another Node.js instance in the gear, this bug fix updates the start up logic to also check whether another supervisor or child is running before starting another. As a result, accidental second invocations of the supervisor starting now correctly exit. The oo-admin-upgrade command is required to upgrade existing gears after applying this fix. See the Solution section in the errata advisory for full details.
Story Points: ---
Clone Of: 1077353
Environment:
Last Closed: 2014-08-04 09:27:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0999 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.4 bug fix and enhancement update 2014-08-04 13:26:43 EDT

  None (edit)
Comment 4 Anping Li 2014-07-15 00:28:52 EDT
erified and pass on puddle-2-1-2014-07-14. 
After restart gears, only there is only one nodejs process.

[njs-hanli1dom.example.com run]\> ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
3861      4795  4784  0 00:24 ?        00:00:00 sshd: 53c4a0bd6892df587f000005@pts/1
3861      4796  4795  0 00:24 pts/1    00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i
3861      5040  4796  0 00:24 pts/1    00:00:00 ps -ef
3861     11122     1  0 Jul14 ?        00:00:00 node /opt/rh/nodejs010/root/usr/bin/supervisor -e
3861     11123     1  0 Jul14 ?        00:00:00 /usr/bin/logshifter -tag nodejs
3861     11168 11122  0 Jul14 ?        00:00:00 node server.js
[njs-hanli1dom.example.com run]\> rm cartridge.pid 
[njs-hanli1dom.example.com run]\> gear restart
Cart to restart?
1. nodejs-0.10
?  1
Stopping NodeJS cartridge
Tue Jul 15 2014 00:24:35 GMT-0400 (EDT): Stopping application 'njs' ...
Tue Jul 15 2014 00:24:35 GMT-0400 (EDT): Stopped Node application 'njs'
Starting NodeJS cartridge
Tue Jul 15 2014 00:24:35 GMT-0400 (EDT): Starting application 'njs' ...
[njs-hanli1dom.example.com run]\> ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
3861      4795  4784  0 00:24 ?        00:00:00 sshd: 53c4a0bd6892df587f000005@pts/1
3861      4796  4795  0 00:24 pts/1    00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i
3861      5361     1  1 00:24 pts/1    00:00:00 node /opt/rh/nodejs010/root/usr/bin/supervisor -e
3861      5362     1  0 00:24 pts/1    00:00:00 /usr/bin/logshifter -tag nodejs
3861      5404  5361  3 00:24 pts/1    00:00:00 node server.js
3861      5420  4796  0 00:24 pts/1    00:00:00 ps -ef
Comment 6 errata-xmlrpc 2014-08-04 09:27:38 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0999.html

Note You need to log in before you can comment on or make changes to this bug.