简体   繁体   English

如何解决heroku中的“应用崩溃”错误

[英]How to solve “App crash” error in heroku

We run a video server on nodejs in heroku. 我们在heroku中的nodejs上运行视频服务器。 Occasionaly our app crashes.The same url opens once and next time it doesn't. 有时我们的应用程序崩溃。同一个URL一次打开,而下一次则没有。 We have Papertrail add-on hooked to it.It shows "app crash" errors and "Connection closed without response" errors.These are some of the errors what we get once in a while. 我们已经挂上了Papertrail附加组件。它显示“应用程序崩溃”错误和“连接关闭而没有响应”错误。这些是我们偶尔会遇到的一些错误。

Nov 11 02:06:08 XXXXXXXX heroku/router: at=error code=H10 desc="App crashed" method=GET path="/media/556e108442577c030072a109" host=www.xxxxxx.co request_id=46779cd1-507f-4252-b8ac-79c250556869 fwd="5.218.182.7" dyno= connect= service= status=503 bytes= protocol=https 
Nov 11 02:06:33 XXXXXXXX heroku/router: at=error code=H10 desc="App crashed" method=GET path="/media/556e108442577c030072a109" host=www.xxxxxx.co request_id=b648c1c4-55db-403a-b5e6-702516d0d61d fwd="5.218.182.7" dyno= connect= service= status=503 bytes= protocol=https 
Nov 11 02:06:38 XXXXXXXX heroku/router: at=error code=H10 desc="App crashed" method=GET path="/media/548ee10dbb2ac502000f2ccf" host=www.xxxxxx.co  request_id=e5b7923f-dae7-4344-a3a6-8e1b3f1468b6 fwd="84.201.133.41" dyno= connect= service= status=503 bytes= protocol=http 
Nov 11 02:06:44 XXXXXXXX heroku/router: at=error code=H10 desc="App crashed" method=GET path="/media/556e108442577c030072a109" host=www.xxxxxx.co request_id=91c67bf8-0f34-4df1-b152-fc94a9c52a75 fwd="5.121.70.29" dyno= connect= service= status=503 bytes= protocol=https 
Nov 11 02:07:38 XXXXXXXX heroku/router: at=error code=H10 desc="App crashed" method=GET path="/media/548ee10dbb2ac502000f2ccf" host=www.xxxxxx.co  request_id=58979771-eb0d-463e-b942-0ffdba4b125f fwd="84.201.133.41" dyno= connect= service= status=503 bytes= protocol=http 
Nov 11 02:07:42 XXXXXXXX heroku/router: at=error code=H10 desc="App crashed" method=GET path="/media/59e5d55c20e0cd0400c85aa1" host=www.xxxxxx.co request_id=f82b8377-32e9-48d5-bc02-f0cdfc300b5c fwd="157.55.39.84" dyno= connect= service= status=503 bytes= protocol=https 
Nov 11 02:07:47 XXXXXXXX heroku/router: at=error code=H10 desc="App crashed" method=GET path="/js/mediaelement-flash-video.swf" host=www.xxxxxx.co  request_id=5f83f33f-0bed-4ab5-80a2-847546f57052 fwd="207.46.13.113" dyno= connect= service= status=503 bytes= protocol=https 
Nov 11 02:19:54 XXXXXXXX heroku/router: at=error code=H13 desc="Connection closed without response" method=GET path="/media/5a05dea5c450b804002e0d04" host=www.xxxxxx.co  request_id=7ee98386-95f2-4979-83b5-00288fad959d fwd="66.249.66.1" dyno=web.1 connect=0ms service=12ms status=503 bytes=0 protocol=https 
Nov 11 08:21:22 XXXXXXXX heroku/router: at=error code=H13 desc="Connection closed without response" method=GET path="/media/5a05dea5c450b804002e0d04" host=www.xxxxxx.co  request_id=27f8511b-3084-4022-aedf-474f3aa75231 fwd="66.249.66.18" dyno=web.1 connect=1ms service=19ms status=503 bytes=0 protocol=https 
Nov 11 10:04:30 XXXXXXXX heroku/router: at=error code=H13 desc="Connection closed without response" method=GET path="/media/5a05dea5c450b804002e0d04" host=www.xxxxxx.co  request_id=b2d644d8-2eed-4d57-9e20-35d61c0c9b3f fwd="66.249.66.1" dyno=web.1 connect=0ms service=24ms status=503 bytes=0 protocol=https 

This is a secondary server (just serves videos to our main server) so it wont have much load (I think).Its not like it causing total system crash but,I am being cautious because website involves money. 这是辅助服务器(仅向我们的主服务器提供视频),因此不会有太多负载(我认为)。它不像会导致整个系统崩溃,但我要谨慎,因为网站涉及金钱。

Does this happens usually?Should I make any changes to my dyno? 通常会发生这种情况吗?我应该对测功机进行任何更改吗? anything that make these errors not to appear (atleast for the same url). 任何不会导致这些错误的内容(至少与同一网址相同)。

same url example: https://www.heroukuapp.com/media/548ee10dbb2ac502000f2ccf 相同的网址示例: https : //www.heroukuapp.com/media/548ee10dbb2ac502000f2ccf

the above wont open any proper url.because "www.heroukuapp.com" is dummy 上面不会打开任何正确的url。因为"www.heroukuapp.com"是虚拟的

thanks 谢谢

Found the reason for these errors. 找到了这些错误的原因。 This has to do with my code in nodejs app. 这与我在nodejs应用程序中的代码有关。

If someone getting the same errors. 如果有人遇到相同的错误。 If they had log handler installed a plugin in heroku (for me its papertrail). 如果他们有日志处理程序,则在heroku中安装了一个插件(对我来说,它是papertrail)。 These errors come in a bunch. 这些错误是一堆的。 If some unhandled error occurs in nodejs app, the app crashes in heroku. 如果在nodejs应用程序中发生一些未处理的错误,则该应用程序在heroku中崩溃。 and trail of errors continues until the app is restarted. 并继续跟踪错误,直到重新启动应用程序为止。 To know the cause of the problem go to point in logs at which the app crashed occurred for the first time. 要知道问题的原因,请指向应用程序第一次崩溃的日志。 There you find the error and cause for this trail. 在这里,您可以找到错误并确定导致此跟踪的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM