I deployed my container image on ACI, which consists of an API created using FastAPI. We use this API to trigger some machine learning tasks in the backend. When the run time is less, I get the response from the API but when the run time is greater than ~300 seconds, I'm not getting any response from the API once the task is completed. When I tested this on my local everything works fine, I doubt there is something to deal with ACI. The same issue happens when I deploy the image in AKS also.
Is there any job completion time limit in ACI and AKS when the job is triggered from API?