What's the recommended max replicaTimeout for Azure ContainerApps Jobs?

Zach Howell 40 Reputation points
2024-06-20T20:34:17.31+00:00

I've been enjoying using Azure Container Apps for my web service and am considering running a long-running job using the Azure Container Apps Jobs feature. I haven't been able to find a good answer to this basic product question though: "What's the longest (or longest recommended) replicaTimeout I can set for a Container App Job?"

Some googling shows another user having trouble at 10 hours runtime. According to this question, the default is 30 minutes. Should I be comfortable running 30-120 minute apps, but worried running a 10+ hour job? What's the theoretical max timeout I could set?

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
323 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pinaki Ghatak 2,635 Reputation points Microsoft Employee
    2024-06-21T10:11:03.5266667+00:00

    Hello @Zach Howell

    The replicaTimeout in Azure Container Apps Jobs is a configuration that determines how long a job replica can run before it’s considered failed and stopped. The default replicaTimeout value is set to 30 minutes

    You can set a different value for replicaTimeout at the time of job creation using the --replica-timeout parameter with the CLI. After creation, you can also adjust the replicaTimeout value via the Azure portal by clicking on the Configuration menu

    However, there isn’t a specific recommended maximum replicaTimeout value mentioned in the Azure documentation. The appropriate replicaTimeout would largely depend on the nature of your job. If your job is expected to run for a longer duration (like a few hours), you can set the replicaTimeout accordingly.

    Please note that setting a very high replicaTimeout might not be ideal if your job is not expected to run for such a long duration, as it could lead to unnecessary resource usage if the job hangs or encounters an issue. It’s always a good practice to estimate the expected duration of your job and set the replicaTimeout slightly higher than that to allow for any unexpected delays.

    As for running a 10+ hour job, it’s important to ensure that your job is designed to handle long-running tasks efficiently. I'd recommend using Durable Azure Functions here.

    Remember, Azure Container Apps Jobs are designed for tasks that start, run for a finite duration, and exit when finished


    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.

    0 comments No comments

0 additional answers

Sort by: Most helpful