Developing a web app with javascript/express/node. On my local machine and Heroku, after running for a short period of time (~5 mins), I have to restart the server or it never responds to requests. I have no idea what could be causing this. Has anyone dealt with something like this before?
2014-02-10T01:25:29.935130+00:00 app[web.1]: GET / 304 281ms
2014-02-10T01:25:29.936342+00:00 heroku[router]: at=info method=GET path=/ host=wwwcom request_id=8d2cd623-c379-4e6a-8b30-1021dd2f5d18 fwd="" dyno=web.1 connect=2ms service=284ms status=304 bytes=0
2014-02-10T01:25:30.096768+00:00 heroku[router]: at=info method=GET path=/css/style.css host=wwwcom request_id=953f1c0c-65ce-4ac7-bfc5-04d5bec2791a fwd="" dyno=web.1 connect=2ms service=7ms status=304 bytes=0
2014-02-10T01:24:10.997307+00:00 heroku[router]: at=info method=GET path=/img/money.jpg host=wwwcom request_id=b1eb7f92-98ae-466d-8e03-a7539215936a fwd="" dyno=web.1 connect=2ms service=2ms status=304 bytes=0
2014-02-10T01:25:30.171105+00:00 heroku[router]: at=info method=GET path=/img/money.jpg host=wwwcom request_id=fd9244d0-22eb-4e28-ac81-b820bcab753b fwd="" dyno=web.1 connect=16ms service=4ms status=304 bytes=0
2014-02-10T01:27:58.989371+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/ host=wwwcom request_id=ddcb47a6-b250-49ea-8ba8-9c9da4c41c91 fwd="" dyno=web.1 connect=1ms service=30001ms status=503 bytes=0
2014-02-10T01:27:58.997153+00:00 app[web.1]: GET / 200 30003ms
I think it would be good to start here, especially the Debugging request timeouts section could be of help:
Debugging request timeouts
One cause of request timeouts is an infinite loop in the code. Test locally (perhaps with a copy of the production database pulled down with pgbackups) and see if you can replicate the problem and fix the bug. Another possibility is that you are trying to do some sort of long-running task inside your web process, such as:
Sending an email
Accessing a remote API (posting to Twitter, querying Flickr, etc.)
Web scraping / crawling
Rendering an image or PDF
Heavy computation (computing a fibonacci sequence, etc.)
Heavy database usage (slow or numerous queries, N+1 queries)
If so, you should move this heavy lifting into a background job which can run asynchronously from your web request. See background workers for details.
Related
I have deployed Django REST FRAMEWORK APP on Heroku deployed successfully but but when viewing site got Application Error with the given below log errors
Stopping all processes with SIGTERM,
State changed from starting to up and down,
at=error code=H12 desc="Request timeout" method=GET path="/"
dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
I can launch my application still, and load a page that doesn't utilize any data from the pg database, but as soon as I hit a page that would look up data I get a time out error
2019-10-04T05:53:38.387579+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/sessions/login" host=get-organized.herokuapp.com request_id=735daa05-c11b-4da6-a7c5-90f8ae46759a fwd="73.158.160.78" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=http
201
These apps used to work fine. I have newer apps that didn't have the maintenance done and they still work fine. I have no idea how to further troubleshoot this, any help would be greatly appreciated.
I'm hosting my app on Heroku, using JawsDB. Sometimes it runs normally, sometimes it crashes. Here's the logs:
2017-11-10T23:53:33.142649+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-app.herokuapp.com request_id=1a43755b-a689-4ce2-939d-e71076d927ed fwd="108.28.184.177" dyno= connect= service= status=503 bytes= protocol=https
It appears to me that there's no service from JawsDB and my app cannot connect to its database. I've read JawsDB documentation and my app still have the connection url, its status is available. I've also manually edited the JAWSDB_URL variable in my app's settings.
Any ideas what's going on with the app?
Adding a Procfile solved this problem.
My Heroku app seems to always crash after deployment.
The errors on Heroku logs are:
2015-07-21T13:28:08.173666+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=calm-hamlet-
5165.herokuapp.com request_id=93f36ad5-f9c2-42b2-a662-9f730d1228ab
fwd="197.253.32.226" dyno= connect= service= status=503 bytes=
and
2015-07-21T13:29:28.127452+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/api/v1/sessions"
host=calm-hamlet-5165.herokuapp.com request_id=69711e3a-913e-45ed-
b4bf-82baaa164edf fwd="197.253.32.226" dyno= connect= service=
status=503 bytes=
What could be causing this error?
Probably is a port definition problem. Heroku will assign a port on which the application will run, regardless of you defining it. You should replace that hardcoded port for something like this.
var port = process.env.PORT || 5000;
Hopefully that fix the problem
I have a simple node proxy that I have added proximo to use whitelisting for an API. It worked before, but having followed the tutorial I now get this in my logs:
2014-08-19T16:23:21.376311+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/?url=http://www.google.com" host=warm-cliffs-7633.herokuapp.com request_id=ecf77eea-a027-4115-86ff-5acf527c7333 fwd="82.24.137.140" dyno=web.1 connect=1ms service=30001ms status=503 bytes=623
If I try to access the page, I get an error message, but the page works fine if no URL is requested from the proxy.
There isn't very much documentation and I'm not sure if this is right in my Procfile:
web: bin/proximo node proxy.js