504 Gateway Time-out at node JS Application hosted on Azure.
I have developed an web application and it is hosted on Azure. It is running smooth. Now came in situation that - I have to run scheduled job on it- this job calls multiple third party API one after other, gets the data in and push in database.
This job runs once week, initially it is running smoothly but now while running system shows 504 Gateway time out error. (Use case is - first API call is to get projects - based on project ID - need to give second call for tasks under that project -- third call is to get Hours under that project)
I need to handle this case, Want an advise on it to handle such time out case.
It is almost always a bad idea to run scheduled tasks in a web app, as they need more time to finish than most commonly configured timeout settings and 504 errors are expected.
Azure has products like Azure Functions which are far more suitable for scheduled tasks so you should migrate them there to eliminate such errors.
Sign in to comment