2015-04-14 204 views
0

我有一個node.js應用程序,在本地工作正常,但是當我在heroku中運行時,它退出,我的狀態爲0或狀態143有人明白這可能意味着什麼?node.js,heroku中的錯誤狀態413是什麼意思?

2015-04-14T21:14:41.428508+00:00 heroku[api]: Release v8 created by 
[email protected] 
2015-04-14T21:14:41.569626+00:00 heroku[web.1]: State changed from up to starting 
2015-04-14T21:14:44.101446+00:00 heroku[web.1]: Stopping all processes with SIGTERM 
2015-04-14T21:14:45.789499+00:00 heroku[web.1]: Starting process with command `node index.js` 
2015-04-14T21:14:45.675609+00:00 heroku[web.1]: Process exited with status 143 
2015-04-14T21:14:47.559184+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY) 
2015-04-14T21:14:47.559208+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1 
2015-04-14T21:14:49.398042+00:00 app[web.1]: Node app is running at localhost:26268 
2015-04-14T21:14:49.825551+00:00 heroku[web.1]: State changed from starting to up 
2015-04-14T21:16:05.765151+00:00 heroku[api]: Deploy bcb1918 by [email protected] 
2015-04-14T21:16:05.765151+00:00 heroku[api]: Release v9 created by [email protected] 
2015-04-14T21:16:06.234464+00:00 heroku[web.1]: State changed from up to starting 
2015-04-14T21:16:09.804498+00:00 heroku[web.1]: Stopping all processes with SIGTERM 
2015-04-14T21:16:10.788591+00:00 heroku[web.1]: Starting process with command `npm start` 
2015-04-14T21:16:11.515039+00:00 heroku[web.1]: Process exited with status 143 
2015-04-14T21:16:12.732654+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY) 
2015-04-14T21:16:12.732736+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1 
2015-04-14T21:16:13.951425+00:00 app[web.1]: 
2015-04-14T21:16:13.951416+00:00 app[web.1]: 
2015-04-14T21:16:13.951422+00:00 app[web.1]: > [email protected] start /app 
2015-04-14T21:16:13.951424+00:00 app[web.1]: > node app.js 
2015-04-14T21:16:15.479452+00:00 heroku[web.1]: Process exited with status 0 
2015-04-14T21:16:15.494024+00:00 heroku[web.1]: State changed from starting to crashed 
2015-04-14T21:17:13.883207+00:00 heroku[router]: at=error code=H10  desc="App crashed" method=GET path="/host=actionistcookalong.herokuapp.com request_id=a5f2ce21-21bd-43ac-8434-9eb39282c542 fwd="178.78.232.172" dyno= connect= service= status=503 bytes= 
2015-04-14T21:21:01.044982+00:00 heroku[web.1]: State changed from crashed to starting 
2015-04-14T21:21:05.040510+00:00 heroku[web.1]: Starting process with command `npm start` 
2015-04-14T21:21:06.954809+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY) 
2015-04-14T21:21:06.954834+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1 
2015-04-14T21:21:07.605924+00:00 app[web.1]: 
2015-04-14T21:21:07.605931+00:00 app[web.1]: > [email protected] start /app 
2015-04-14T21:21:07.605933+00:00 app[web.1]: > node app.js 
2015-04-14T21:21:07.605935+00:00 app[web.1]: 
2015-04-14T21:21:08.874268+00:00 heroku[web.1]: State changed from starting to crashed 
2015-04-14T21:21:08.868440+00:00 heroku[web.1]: Process exited with status 0 
+0

不知道這是否會有所幫助,但據我所知,狀態143是退出代碼。也許看看下面的內容吧http://stackoverflow.com/questions/17631536/https-node-js-application-on-heroku – R4nc1d

+0

其實Heroku阻止了所有的兩條線,這就是爲什麼你會看到143歸來的原因發送一個SIGTERM。所以暫時忽略它。請注意,事情正在重新開始。 往下走。它在路由器上投擲H10。 –

回答

1

嘗試運行控制檯,它可能會崩潰......但會給你推理。通常情況下,它會是一些你沒有注意到或忘記Heroku錯誤日誌報告不好的小改變。

運行此

heroku run node 

heroku restart 
1

143的退出代碼表示一殺過程被髮送和SIGTERM信號終止了您的過程。這通常會在您執行任何重新啓動命令時觸發。