I have a route in a Node.js/Express.js app that takes longer than 30 secs(get info from db, send with an external API call, get response, convert it from XML to JSON, format the JSON and create records in Database). This leads to a 503 error from Heroku, as a read in their docs that Heroku router timeouts after 30 secs. Apparently when i checked the DB I saw these records were created, but I guess Heroku times out before it could send a response back.
Please can anyone suggest a workaround or fix for this timeout issue
perhaps you want to take a look into background jobs on heroku: https://devcenter.heroku.com/articles/background-jobs-queueing