我有一个在本地完美运行的Node.js应用程序,但是只要我将它推送到Heroku,app就会拒绝启动。我运行了heroku logs
,它显示服务器已启动并正在侦听端口。它还说该过程在底部以status 22
退出。 Heroku文档声明Connection Limit Reached
,但我不太清楚这意味着什么。任何人都能指出我正在发生的事情的正确方向吗?
这是Github回购:https://github.com/andrewgu12/MVInteract Heroku app:http://mvinteract.herokuapp.com/
2014-08-30T01:39:28.096394+00:00 heroku[router]: at=info method=GET path="/javascripts/jquery.js" host=mvinteract.herokuapp.com request_id=a29c3b15-c3ab-4dbf-9773-3c5e97329bb0 fwd="129.2.129.222" dyno=web.1 connect=1ms service=125ms status=200 bytes=771
2014-08-30T01:39:28.907226+00:00 heroku[router]: at=info method=GET path="/images/IMG_9771.jpg" host=mvinteract.herokuapp.com request_id=b9e6c7b1-2c36-4c02-b23e-e6f08841bce4 fwd="129.2.129.222" dyno=web.1 connect=2ms service=290ms status=200 bytes=786
2014-08-30T01:39:28.829830+00:00 app[web.1]: ←[90mGET /images/IMG_9771.jpg ←[32m200 ←[90m220ms - 2.34mb←[0m
2014-08-30T01:49:33+00:00 heroku[slug-compiler]: Slug compilation started
2014-08-30T01:49:56+00:00 heroku[slug-compiler]: Slug compilation finished
2014-08-30T01:49:56.635217+00:00 heroku[api]: Deploy db9ac78 by andrew@mingbogu.com
2014-08-30T01:49:56.635287+00:00 heroku[api]: Release v24 created by andrew@mingbogu.com
2014-08-30T01:49:56.922603+00:00 heroku[web.1]: State changed from up to starting
2014-08-30T01:49:59.782636+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2014-08-30T01:49:59.221476+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-08-30T01:50:00.440881+00:00 heroku[web.1]: Process exited with status 22
2014-08-30T01:50:01.159538+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-30T01:50:02.382946+00:00 app[web.1]:
2014-08-30T01:50:02.382965+00:00 app[web.1]: > mvinteract@0.0.1 start /app
2014-08-30T01:50:02.382967+00:00 app[web.1]: > node ./bin/www
2014-08-30T01:50:02.382968+00:00 app[web.1]:
2014-08-30T01:50:02.880451+00:00 app[web.1]: Express server listening on port 33597 in development mode
2014-08-30T01:50:03.286246+00:00 heroku[web.1]: State changed from starting to up
2014-08-30T01:51:33.748521+00:00 app[web.1]: Warning: missing space before text for line 30 of jade file "/app/views/index.jade"
2014-08-30T01:51:33.853370+00:00 heroku[router]: at=info method=HEAD path="/" host=mvinteract.herokuapp.com request_id=852fabd8-cf7b-4c57-9f25-9f7c09fd4692 fwd="50.97.161.229" dyno=web.1 connect=1ms service=644ms status=200 bytes=360
2014-08-30T01:51:33.851299+00:00 app[web.1]: ←[90mHEAD / ←[32m200 ←[90m639ms - 1.39kb←[0m
2014-08-30T02:08:58+00:00 heroku[slug-compiler]: Slug compilation started
2014-08-30T02:09:22+00:00 heroku[slug-compiler]: Slug compilation finished
2014-08-30T02:09:22.747726+00:00 heroku[web.1]: State changed from up to starting
2014-08-30T02:09:22.641841+00:00 heroku[api]: Release v25 created by andrew@mingbogu.com
2014-08-30T02:09:22.641775+00:00 heroku[api]: Deploy d928c6a by andrew@mingbogu.com
2014-08-30T02:09:25.111625+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-08-30T02:09:25.749566+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2014-08-30T02:09:26.438990+00:00 heroku[web.1]: Process exited with status 22
2014-08-30T02:09:28.008233+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-30T02:09:29.138444+00:00 app[web.1]:
2014-08-30T02:09:29.138464+00:00 app[web.1]: > mvinteract@0.0.1 start /app
2014-08-30T02:09:29.138467+00:00 app[web.1]:
2014-08-30T02:09:29.138466+00:00 app[web.1]: > node ./bin/www
2014-08-30T02:09:29.757517+00:00 app[web.1]: Express server listening on port 41644 in development mode
2014-08-30T02:09:30.107275+00:00 heroku[web.1]: State changed from starting to up
2014-08-30T02:12:19+00:00 heroku[slug-compiler]: Slug compilation started
2014-08-30T02:12:43+00:00 heroku[slug-compiler]: Slug compilation finished
2014-08-30T02:12:43.900570+00:00 heroku[api]: Deploy 20592aa by andrew@mingbogu.com
2014-08-30T02:12:43.900570+00:00 heroku[api]: Release v26 created by andrew@mingbogu.com
2014-08-30T02:12:44.462142+00:00 heroku[web.1]: State changed from up to starting
2014-08-30T02:12:46.776970+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-08-30T02:12:48.148454+00:00 heroku[web.1]: Process exited with status 143
2014-08-30T02:12:50.014282+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-30T02:12:51.548957+00:00 app[web.1]:
2014-08-30T02:12:51.548977+00:00 app[web.1]: > mvinteract@0.0.1 start /app
2014-08-30T02:12:51.548979+00:00 app[web.1]: > nodemon ./bin/www
2014-08-30T02:12:51.548980+00:00 app[web.1]:
2014-08-30T02:12:52.306384+00:00 app[web.1]: 30 Aug 02:12:52 - ←[33m[nodemon] watching: *.*←[39m
2014-08-30T02:12:52.304804+00:00 app[web.1]: 30 Aug 02:12:52 - ←[33m[nodemon] v1.2.1←[39m
2014-08-30T02:12:52.306150+00:00 app[web.1]: 30 Aug 02:12:52 - ←[33m[nodemon] to restart at any time, enter `rs`←[39m
2014-08-30T02:12:52.306717+00:00 app[web.1]: 30 Aug 02:12:52 - ←[32m[nodemon] starting `node ./bin/www`←[39m
2014-08-30T02:12:54.252363+00:00 app[web.1]: Express server listening on port 59874 in development mode
2014-08-30T02:12:54.779441+00:00 heroku[web.1]: State changed from starting to up
2014-08-30T02:16:41+00:00 heroku[slug-compiler]: Slug compilation started
2014-08-30T02:17:03+00:00 heroku[slug-compiler]: Slug compilation finished
2014-08-30T02:17:03.220456+00:00 heroku[api]: Deploy 5164e80 by andrew@mingbogu.com
2014-08-30T02:17:03.220534+00:00 heroku[api]: Release v27 created by andrew@mingbogu.com
2014-08-30T02:17:03.475831+00:00 heroku[web.1]: State changed from up to starting
2014-08-30T02:17:06.416837+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-08-30T02:17:08.640550+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-30T02:17:09.665142+00:00 app[web.1]:
2014-08-30T02:17:09.665164+00:00 app[web.1]: > mvinteract@0.0.1 start /app
2014-08-30T02:17:09.665166+00:00 app[web.1]: > nodemon ./bin/www
2014-08-30T02:17:09.665168+00:00 app[web.1]:
2014-08-30T02:17:10.261399+00:00 app[web.1]: 30 Aug 02:17:10 - ←[33m[nodemon] to restart at any time, enter `rs`←[39m
2014-08-30T02:17:10.262080+00:00 app[web.1]: 30 Aug 02:17:10 - ←[32m[nodemon] starting `node ./bin/www`←[39m
2014-08-30T02:17:10.261687+00:00 app[web.1]: 30 Aug 02:17:10 - ←[33m[nodemon] watching: *.*←[39m
2014-08-30T02:17:10.257488+00:00 app[web.1]: 30 Aug 02:17:10 - ←[33m[nodemon] v1.2.1←[39m
2014-08-30T02:17:11.347078+00:00 app[web.1]: Express server listening on port 30970 in development mode
2014-08-30T02:17:11.423826+00:00 heroku[web.1]: State changed from starting to up
2014-08-30T02:17:15.558081+00:00 heroku[web.1]: Process exited with status 143
2014-08-30T02:24:31.443643+00:00 heroku[web.1]: State changed from up to starting
2014-08-30T02:24:34.687156+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-08-30T02:24:35.450601+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-30T02:24:36.083997+00:00 heroku[web.1]: Process exited with status 143
2014-08-30T02:24:36.618400+00:00 app[web.1]:
2014-08-30T02:24:36.618418+00:00 app[web.1]: > nodemon ./bin/www
2014-08-30T02:24:36.618416+00:00 app[web.1]: > mvinteract@0.0.1 start /app
2014-08-30T02:24:36.618419+00:00 app[web.1]:
2014-08-30T02:24:37.098105+00:00 app[web.1]: 30 Aug 02:24:37 - ←[33m[nodemon] watching: *.*←[39m
2014-08-30T02:24:37.096652+00:00 app[web.1]: 30 Aug 02:24:37 - ←[33m[nodemon] v1.2.1←[39m
2014-08-30T02:24:37.098421+00:00 app[web.1]: 30 Aug 02:24:37 - ←[32m[nodemon] starting `node ./bin/www`←[39m
2014-08-30T02:24:37.097904+00:00 app[web.1]: 30 Aug 02:24:37 - ←[33m[nodemon] to restart at any time, enter `rs`←[39m
2014-08-30T02:24:37.603499+00:00 app[web.1]: Express server listening on port 53939 in development mode
2014-08-30T02:24:37.881966+00:00 heroku[web.1]: State changed from starting to up
2014-08-30T02:27:00+00:00 heroku[slug-compiler]: Slug compilation started
2014-08-30T02:27:24+00:00 heroku[slug-compiler]: Slug compilation finished
2014-08-30T02:27:24.692702+00:00 heroku[api]: Deploy 93109ca by andrew@mingbogu.com
2014-08-30T02:27:24.692862+00:00 heroku[api]: Release v28 created by andrew@mingbogu.com
2014-08-30T02:27:25.183363+00:00 heroku[web.1]: State changed from up to starting
2014-08-30T02:27:27.733184+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2014-08-30T02:27:27.223544+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-08-30T02:27:28.433388+00:00 heroku[web.1]: Process exited with status 22
2014-08-30T02:27:30.623847+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-30T02:27:31.727492+00:00 app[web.1]:
2014-08-30T02:27:31.727513+00:00 app[web.1]: > node ./bin/www
2014-08-30T02:27:31.727512+00:00 app[web.1]: > mvinteract@0.0.1 start /app
2014-08-30T02:27:31.727515+00:00 app[web.1]:
2014-08-30T02:27:32.420283+00:00 app[web.1]: Express server listening on port 51720 in development mode
2014-08-30T02:27:32.735309+00:00 heroku[web.1]: State changed from starting to up
答案 0 :(得分:0)
我已经拉了你的代码并环顾四周。正如你所说的在当地(与领班)一起运行似乎工作正常。
我可以建议您在/ bin / www脚本中添加更多控制台日志以查看整个事情是否成功并且可能捕获SIGTERM信号,如记录here