Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
601 views
in Technique[技术] by (71.8m points)

node.js - http GET requests getting Timed Out on Heroku App (PERN stack) | Error Code: H12

http GET requests getting Timed Out on my Heroku Deployed App, while it works perfectly fine on my local machine.

I am fetching data from simple queries on a PostgreSQL database.

Here's the Heroku App --> https://fyle-fullstack-app.herokuapp.com/ and API's --> https://fyle-fullstack-app.herokuapp.com/api/branches?q=bangalore&limit=100 and postgres dump--> https://github.com/snarayanank2/indian_banks

The fact is 2-3 requests with same queries are working, but others are not. (I guess those were cached before commit).

Here's the Heroku's Error Logs -->

2021-01-10T09:38:39.959014+00:00 heroku[router]: at=error code=H12
desc="Request timeout" method=GET path="/api/branches?q=Kolkata" host=fyle-
fullstack-app.herokuapp.com request_id=3e184180-6b37-4846-930b-ddf6ace39f1d
fwd="157.45.169.72" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0
protocol=https

Console Logs :

GEThttps://fyle-fullstack-app.herokuapp.com/api/branches?q=Ahmedabad

[HTTP/1.1 503 Service Unavailable 30565ms]

XHRGEThttps://fyle-fullstack-app.herokuapp.com/api/branches?q=Kolkata
[HTTP/1.1 503 Service Unavailable 31892ms]

JSON.parse: unexpected character at line 1 column 1 of the JSON data backend.js:6:2315
question from:https://stackoverflow.com/questions/65651937/http-get-requests-getting-timed-out-on-heroku-app-pern-stack-error-code-h12

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...