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
2.1m questions
2.1m answers
60 comments
57.0k users