javascript - Node.js app suddenly fails on local Docker -


i have simple node.js app cloned this , addition it's connecting rds instance. runs fine locally (osx boot2docker), , runs few minutes when place in docker container, , of sudden, page no longer renders , empty response server. container still running yet i'm getting strange message in logs. various files below.

what missing here?

docker run command docker run -p 49161:3000 -d <image name>

dockerfile

from    centos:centos6  # enable epel node.js run     rpm -uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # install node.js , npm # run yum -y install node run yum install -y npm run npm install -g express-generator@4 run npm install supervisor -g run npm install pg --save run npm install winston --save   # bundle app source copy . / # install app dependencies run npm install  expose  3000 cmd ["npm", "start"] 

docker logs

crashing child error reading path: /proc/1/task/1/cwd/proc/1/map_files error reading path: /proc/1/task/1/cwd/proc/10/map_files error reading path: /proc/1/task/1/cwd/proc/self/map_files error reading path: /proc/1/task/1/root/proc/10/map_files error reading path: /proc/1/task/1/root/proc/1/map_files error reading path: /proc/1/task/1/root/proc/self/map_files error reading path: /proc/1/task/5/cwd/proc/1/map_files error reading path: /proc/1/task/5/cwd/proc/10/map_files error reading path: /proc/1/task/5/cwd/proc/self/map_files error reading path: /proc/1/task/5/root/proc/1/map_files error reading path: /proc/1/task/5/root/proc/10/map_files error reading path: /proc/1/task/5/root/proc/self/map_files error reading path: /proc/1/task/6/cwd/proc/10/map_files error reading path: /proc/1/task/6/cwd/proc/1/map_files error reading path: /proc/1/task/6/cwd/proc/self/map_files error reading path: /proc/1/task/6/root/proc/1/map_files error reading path: /proc/1/task/6/root/proc/10/map_files error reading path: /proc/1/task/6/root/proc/self/map_files error reading path: /proc/1/task/8/cwd/proc/1/map_files error reading path: /proc/1/task/8/cwd/proc/10/map_files error reading path: /proc/1/task/8/cwd/proc/self/map_files error reading path: /proc/1/task/8/root/proc/1/map_files error reading path: /proc/1/task/8/root/proc/10/map_files error reading path: /proc/1/task/8/root/proc/self/map_files error reading path: /proc/1/task/9/cwd/proc/1/map_files error reading path: /proc/1/task/9/cwd/proc/10/map_files error reading path: /proc/1/task/9/cwd/proc/self/map_files error reading path: /proc/1/task/9/root/proc/1/map_files error reading path: /proc/1/task/9/root/proc/10/map_files error reading path: /proc/1/task/9/root/proc/self/map_files error reading path: /proc/1/task/7/cwd/proc/1/map_files error reading path: /proc/1/task/7/cwd/proc/10/map_files error reading path: /proc/1/task/7/cwd/proc/self/map_files error reading path: /proc/1/task/7/root/proc/1/map_files error reading path: /proc/1/task/7/root/proc/10/map_files error reading path: /proc/1/task/7/root/proc/self/map_files error reading path: /proc/10/task/11/cwd/proc/1/map_files error reading path: /proc/10/task/11/cwd/proc/10/map_files error reading path: /proc/10/task/11/cwd/proc/self/map_files error reading path: /proc/10/task/11/root/proc/10/map_files error reading path: /proc/10/task/11/root/proc/1/map_files error reading path: /proc/10/task/11/root/proc/self/map_files error reading path: /proc/10/task/13/cwd/proc/1/map_files error reading path: /proc/10/task/13/cwd/proc/10/map_files error reading path: /proc/10/task/13/cwd/proc/self/map_files error reading path: /proc/10/task/13/root/proc/1/map_files error reading path: /proc/10/task/13/root/proc/10/map_files error reading path: /proc/10/task/13/root/proc/self/map_files error reading path: /proc/10/task/10/cwd/proc/1/map_files error reading path: /proc/10/task/10/cwd/proc/10/map_files error reading path: /proc/10/task/10/cwd/proc/self/map_files error reading path: /proc/10/task/10/root/proc/10/map_files error reading path: /proc/10/task/10/root/proc/1/map_files error reading path: /proc/10/task/10/root/proc/self/map_files error reading path: /proc/10/task/14/cwd/proc/1/map_files error reading path: /proc/10/task/14/cwd/proc/10/map_files error reading path: /proc/10/task/14/cwd/proc/self/map_files error reading path: /proc/10/task/14/root/proc/1/map_files error reading path: /proc/10/task/14/root/proc/10/map_files error reading path: /proc/10/task/14/root/proc/self/map_files error reading path: /proc/10/task/16/cwd/proc/1/map_files error reading path: /proc/10/task/16/cwd/proc/10/map_files error reading path: /proc/10/task/16/cwd/proc/self/map_files error reading path: /proc/10/task/16/root/proc/10/map_files error reading path: /proc/10/task/16/root/proc/1/map_files error reading path: /proc/10/task/16/root/proc/self/map_files error reading path: /proc/10/task/15/cwd/proc/1/map_files error reading path: /proc/10/task/15/cwd/proc/10/map_files error reading path: /proc/10/task/15/cwd/proc/self/map_files error reading path: /proc/10/task/15/root/proc/1/map_files error reading path: /proc/10/task/15/root/proc/10/map_files error reading path: /proc/10/task/15/root/proc/self/map_files error reading path: /proc/self/task/10/cwd/proc/1/map_files error reading path: /proc/self/task/10/cwd/proc/10/map_files error reading path: /proc/self/task/10/cwd/proc/self/map_files error reading path: /proc/self/task/10/root/proc/1/map_files error reading path: /proc/self/task/10/root/proc/10/map_files error reading path: /proc/self/task/10/root/proc/self/map_files error reading path: /proc/self/task/11/cwd/proc/1/map_files error reading path: /proc/self/task/11/cwd/proc/10/map_files error reading path: /proc/self/task/11/cwd/proc/self/map_files error reading path: /proc/self/task/11/root/proc/10/map_files error reading path: /proc/self/task/11/root/proc/1/map_files error reading path: /proc/self/task/11/root/proc/self/map_files error reading path: /proc/self/task/13/cwd/proc/1/map_files error reading path: /proc/self/task/13/cwd/proc/10/map_files error reading path: /proc/self/task/13/cwd/proc/self/map_files error reading path: /proc/self/task/13/root/proc/1/map_files error reading path: /proc/self/task/13/root/proc/10/map_files error reading path: /proc/self/task/13/root/proc/self/map_files error reading path: /proc/self/task/14/cwd/proc/1/map_files error reading path: /proc/self/task/14/cwd/proc/10/map_files error reading path: /proc/self/task/14/cwd/proc/self/map_files error reading path: /proc/self/task/14/root/proc/1/map_files error reading path: /proc/self/task/14/root/proc/10/map_files error reading path: /proc/self/task/14/root/proc/self/map_files error reading path: /proc/self/task/15/cwd/proc/1/map_files error reading path: /proc/self/task/15/cwd/proc/10/map_files error reading path: /proc/self/task/15/cwd/proc/self/map_files error reading path: /proc/self/task/15/root/proc/1/map_files error reading path: /proc/self/task/15/root/proc/10/map_files error reading path: /proc/self/task/15/root/proc/self/map_files error reading path: /proc/self/task/16/cwd/proc/1/map_files error reading path: /proc/self/task/16/cwd/proc/10/map_files error reading path: /proc/self/task/16/cwd/proc/self/map_files error reading path: /proc/self/task/16/root/proc/1/map_files error reading path: /proc/self/task/16/root/proc/10/map_files error reading path: /proc/self/task/16/root/proc/self/map_files 

app.js file

var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('./utils/logger'); var cookieparser = require('cookie-parser'); var bodyparser = require('body-parser');  var routes = require('./server/routes/index');  var app = express();  // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade');  // uncomment after placing favicon in /public //app.use(favicon(__dirname + '/public/favicon.ico')); //app.use(logger('dev')); app.use(require('morgan')({ "stream": logger.stream })); app.use(bodyparser.json()); app.use(bodyparser.urlencoded({ extended: false })); app.use(cookieparser()); app.use(express.static(path.join(__dirname, './client', 'public')));  app.use('/', routes);  // catch 404 , forward error handler app.use(function(req, res, next) {     var err = new error('not found');     err.status = 404;     next(err); });  // error handlers  // development error handler // print stacktrace if (app.get('env') === 'development') {     app.use(function(err, req, res, next) {         res.status(err.status || 500);         res.render('error', {             message: err.message,             error: err         });     }); }  // production error handler // no stacktraces leaked user app.use(function(err, req, res, next) {     res.status(err.status || 500);     res.render('error', {         message: err.message,         error: {}     }); });   module.exports = app; 

update 1 interesting...it looks container no longer running after ~15 minutes. running while empty response page, can confirm container no longer running. if re-execute docker run, see page load briefly, , container up.

i'm posting else runs this. essentially, modifying dockerfile resolved this. apparently memory in original container extremely high , causing container crash. i'm still not clear why happening, , used majority of original dockerfile because that's found in docker examples.

revised dockerfile

from node:0.10-onbuild  run npm install supervisor -g run npm install pg --save  expose 3000 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -