How to trace app crash in heroku? - node.js

My REST api heroku app (using restify) crashes and I dont know why. In heroku logs there is only line:
at=error code=H10 desc="App crashed" method=GET path=/some/api/path host=some.host.com fwd="83.28.44.34" dyno= connect= service= status=503 bytes=
I tried adding this:
process.on('uncaughtException',function(err){
console.log('#########');
console.log(err);
throw err;
});
But it does not writes anything to logs.
The problem is I don't know if app crashes during http request because there are some functions that may be fired even after request is complete...
How I can trace what crashes my app?

Related

Node, TS, express and Socket.IO server crashes on heroku with code=H10

I've hosted a node TS server on Heroku, and while the application functions perfectly, it crashes when I resume use after some time of inactivity. Below is the error code I see in the heroku logs.
at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=4&transport=polling&t=O838TxJ" host=rgt-server.herokuapp.com request_id=640e7b4e-d679-4ffb-8811-dd369c338004 fwd="102.176.94.160" dyno= connect= service= status=503 bytes= protocol=https
I solve this problem by adding an error handler to my redis client.
// handle redis connection temporarily going down without app crashing
redisClient.on("error", function(err) {
console.error("Error connecting to redis", err);
});

App deployed on Heroku crashes randomly after hours running perfectly

Randomly my app crash, it's randomly because crash at requests that work by hours without any errors, but, sometimes "with no specific reason" it's crash, when it happens I just restart the dynos and de app run normally for more few hours.
the last log:
2022-05-23T09:32:57.310697+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST Path="/admin/presences/numconfirm" host=stark-waters56023.herokuapp.com request_id=3dc168eb-deea-4b12-9f0c-ccf9a063d174 fwd="45.180.239.137" dyno= connect= service= status=503 bytes= protocol=http

Trying to deploy a mern stack (Node JS) application on heroku (Getting error H10)

I am just starting with the MERN stack and Node JS to create a simple website - I published the project to github and tried to deploy on Heroku, the deployment is succesfuel; however, when I view the website it tells me
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
After I checked the Heroku CLI, I got the following error:
npm ERR! /app/.npm/_logs/2020-10-14T20_29_22_623Z-debug.log
2020-10-14T20:29:24.764157+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=seer-team-12.herokuapp.com
request_id=58a4c5ca-5517-423f-a41f-c7d54985c778 fwd="122.58.167.129"
dyno= connect= service= status=503 bytes= protocol=https
2020-10-14T20:29:25.246802+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico"
host=seer-team-12.herokuapp.com
request_id=ba173afb-208e-4073-80f0-99f6029545e5 fwd="122.58.167.129"
dyno= connect= service= status=503 bytes= protocol=https
I tired many solutions - making sure the PORT is process.env.PORT - and tried to make sure the Procfile is fine.
That is the the github application:
https://github.com/mentalist302/SEER
Thank you in advance :)

Heroku error code=H10 desc="App crashed" method=GET path="/" dyno= connect= service= status=503 bytes= protocol=https

I've been searching around on this one for a while and can't find anything that seems to be applicable in my situation. I've been staring at these logs and I can't see what the problem is.
I am trying to deploy my nodejs and react app to heroku but getting error again and again.
I have done heroku logs and I am getting these logs:
enter image description here

Heroku deployment error: at=error code=H10 desc="App crashed"

I am trying to deploy my AngularJS Yeoman Generator-AngularFire Node Express app to Heroku. I am able to push to Heroku successfully as it shows
Fetching repository, done.
Everything up-to-date
when I git push heroku master
(Not completely sure if this means it is failsafe, tip to check another way would be much appreciated). When I run the command heroku open my web page shows
Application 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.
I ran the command heroku logs I get these errors:
2014-09-27T21:25:11.216896+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mayapp.herokuapp.com request_id=6921ca4b-13de-4194-858f-0132a0d36192 fwd="70.166.121.220" dyno= connect= service= status=503 bytes=
2014-09-27T21:25:11.712742+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=myapp.herokuapp.com request_id=6e6dde3a-ca2a-4650-95c0-c4ad68d7f597 fwd="70.166.121.220" dyno= connect= service= status=503 bytes=
Here are my routes in my routes.js
config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.when('/login', {
templateUrl: 'views/login.html',
controller: 'LoginCtrl'
})
.otherwise({redirectTo: '/'});
}])
How do I get passed this issue and successfully deploy?

Resources