We run a video server on nodejs in heroku. Occasionaly our app crashes.The same url opens once and next time it doesn't. 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.
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
the above wont open any proper url.because "www.heroukuapp.com" is dummy
thanks
Found the reason for these errors. This has to do with my code in nodejs app.
If someone getting the same errors. If they had log handler installed a plugin in heroku (for me its papertrail). These errors come in a bunch. If some unhandled error occurs in nodejs app, the app crashes in 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.
Related
I have deployed my webpage on Heroku, with MongoAtlas for hosting database. The site has been deployed successfully, but on opening the URL it shows the following error.
An error occurred in the application and your page could not be
served. If you are the application owner, check your logs for details.
You can do this from the Heroku CLI with the command heroku logs
--tail
The logs show this
2020-06-10T10:31:25.558083+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-06-10T10:31:25.676299+00:00 heroku[web.1]: Process exited with status 137
2020-06-10T10:31:25.723593+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-11T04:42:15.117508+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=immense-harbor-74512.herokuapp.com request_id=cd4e6bba-2b33-447a-9b73-da66c77c4946 fwd=
"47.9.8.24" dyno= connect= service= status=503 bytes= protocol=https
2020-06-11T04:42:15.971379+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=immense-harbor-74512.herokuapp.com request_id=b5b1c208-bd9e-48b3-9c96-d8b79a
af9123 fwd="47.9.8.24" dyno= connect= service= status=503 bytes= protocol=https
2020-06-11T04:42:37.965020+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=immense-harbor-74512.herokuapp.com request_id=52f3dcab-4f12-41cd-96dd-12856fbfb240 fwd=
"47.9.8.24" dyno= connect= service= status=503 bytes= protocol=https
What is the problem and how to solve it
How to resolve this error, n open heroku app:
2018-12-26T22:50:56.636727+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=young-springs-33489.herokuapp.com request_id=cdc49a54-7667-4406-bb48-9347699e2eb3 fwd="24.216.55.31" dyno= connect= service= status=503 bytes= protocol=https
I've tried everything I can think of and exhausted google searches. I've already ruled out the most common problems (ex: not using process.env.PORT in app.listen).
Here are the heroku logs:
2018-07-18T02:43:26.705491+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=limitless-river-42936.herokuapp.com request_id=78261d20-9656-4f24-9a50-6a8e90fe216f fwd="104.32.39.36" dyno= connect= service= status=503 bytes= protocol=https
2018-07-18T02:43:28.104845+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=limitless-river-42936.herokuapp.com request_id=dab234a8-b9d7-4bbe-aa2b-36e6c4b2fcc9 fwd="104.32.39.36" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
And here is the server.js file
Any help would be greatly appreciated!
It turns out the log files weren't showing all the errors for some reason -- there was a typo in one of my imports. :)
I keep getting error code=H10 randomly when I start my Heroku app. Sometimes the app starts, sometimes it doesn't.
My app is built with NodeJS, Express, MySQL and JawsDB.
Here's the details in my app's log:
2017-11-26T15:21:36.906937+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=<my app name>.herokuapp.com request_id=4c63d70d-f081-44a5-b4fe-f0992116ba79 fwd="108.28.184.177" dyno= connect= service= status=503 bytes= protocol=https
2017-11-26T15:21:36.954063+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=<my app name>.herokuapp.com request_id=e42d6293-512f-4ea1-ba35-403f44e4fd9a fwd="108.28.184.177" dyno= connect= service= status=503 bytes= protocol=https
I've looked online and added favicon.ico in my public folder. Nothing changes. I've had this problem before with my previous app and I ran heroku restart and it works for that one, but doesn't for this one.
I recently learned node.js and wanted to deploy my project, which I did on Heroku. However, Heroku is giving me the error messages copied below. Though I have logged the error, I am still not able to figure out the solution.
Here are the logs:
2016-04-13T14:24:17.248681+00:00 heroku[web.1]: Process exited with status 1
2016-04-13T14:24:17.256460+00:00 heroku[web.1]: State changed from starting to c
rashed
2016-04-13T14:24:30.863162+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=rather-website.herokuapp.com request_id=770f4364-
859f-453a-a09c-7f23ddaf6eca fwd="103.248.93.93" dyno= connect= service= status=5
03 bytes=
2016-04-13T14:24:31.537783+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=rather-website.herokuapp.com request_id=16af5073-
7bb2-431e-bc08-b2fb6773eab8 fwd="103.248.93.93" dyno= connect= service= status=5
03 bytes=
2016-04-13T14:27:59.122567+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=rather-website.herokuapp.com request_id=c6ba2f2f-
7379-41bf-afc9-550c309e7200 fwd="103.248.93.93" dyno= connect= service= status=5
03 bytes=
2016-04-13T14:29:17.354776+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=rather-website.herokuapp.com request_id=088965d7-
ddcf-46ba-a44c-ed1486938993 fwd="103.248.93.93" dyno= connect= service= status=5
03 bytes=
2016-04-13T14:29:21.657898+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=rather-website.herokuapp.com request_id=94d1eceb-
fa46-4795-82f6-4c369eb04fb6 fwd="103.248.93.93" dyno= connect= service= status=5
03 bytes=
2016-04-13T14:29:24.198371+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=rather-website.herokuapp.com request_id=6ff6b6be-
e29c-4a5b-b48b-cbf4f4850ccf fwd="103.248.93.93" dyno= connect= service= status=5
03 bytes=
2016-04-13T14:29:28.987226+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=rather-website.herokuapp.com request_id=1a1709f0-
9967-4ff0-a9d3-473e147c23e1 fwd="103.248.93.93" dyno= connect= service= status=5
03 bytes=
Here is the error:
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
The node.js server is crashing upon HTTP GET request on route /. This isn't a platform error, but a code error (likely your index.js file). You will want to check the code for error between the lines:
app.get('/', function(req, res) {
//likely some syntax error here
}
I highly recommend running the app on your local machine using command such as: node index.js to see what part of your HTTP GET code is causing the error. The CLI will give a specific line number on where the error is being caused.
Heroku Local is also a great tool for testing your app before deploying it to heroku.