2012-10-08 47 views
0

Heroku是指app[web.1]<main>:48是什麼意思?Heroku對app [web.1]的意義是什麼?

我有一個崩潰,只發生在Heroku上,而不是在我的電腦上,我試圖找出導致崩潰的確切線條。這些是日誌

2012-10-08T21:31:49+00:00 app[web.1]: <main>:48:in `method_missing': wrong number of arguments (1 for 2) (ArgumentError) 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:265:in `start' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:137:in `start' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/server.rb:104:in `block in initialize' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/bin/rackup:4:in `<top (required)>' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/rackup:19:in `load' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/server.rb:104:in `===' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/rackup:19:in `<main>' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/server.rb:102:in `initialize' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/thin.rb:9:in `new' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/thin.rb:9:in `run' 
2012-10-08T21:31:49+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/server.rb:102:in `each' 
2012-10-08T21:31:50+00:00 heroku[web.1]: Process exited with status 1 
2012-10-08T21:31:50+00:00 heroku[web.1]: State changed from starting to crashed 
2012-10-08T21:31:52+00:00 heroku[router]: Error H10 (App crashed) -> GET placeboxy.herokuapp.com/ dyno= queue= wait= service= status=503 bytes= 

崩潰在我的代碼或在Web服務器薄或其他?

編輯我改變了Procfile在Heroku上運行服務器獨角獸,並且崩潰停止了。沒有與美洲獅錯誤。有任何想法嗎?很薄弱的過錯?

+0

我唯一知道的就是app [web.1]是指你的dyno,如果你有多個dyno,那麼你會看到app [web.2]等等......並且例如,如果你有工人他們會顯示爲app [worker.1]等。 – pjam

回答

3

app[web.1]是heroku添加到日誌中標記哪個進程正在發送日誌的標記,因爲所有日誌都集中在一箇中央位置,您仍可以過濾單個進程並分析進程日誌。

<main>:48:部分表示執行因異常而停止的文件/行。在這種情況下(<main>)它是正在運行的主腳本。可能你不會在那裏發現你的錯誤。你必須在回溯中搜索失敗的代碼部分,尋找不是外部庫的東西,也不要核心ruby。你顯示的回溯沒有任何幫助,通常堆棧跟蹤中的誤差要低得多。

+0

謝謝saverio。我已經複製了整個堆棧跟蹤。我試過在Heroku上使用服務器Unicorn,並沒有崩潰,所以也許崩潰是在Thin中。 –