<p>I have deployed the Azure Queue Trigger Function to Kubernetes with KEDA for event-driven activation and scaling. It works fine with smaller jobs, but if the time taken exceeds 5 minutes, the pods get terminated automatically, and new pods get created. Here is my YAML file, and I have set the functionTimeout to 00:30:00 in host.json. Any help would be highly appreciated.</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: queue-test
  labels:
    app: queue-test
spec:
  selector:
    matchLabels:
      app: queue-test
  template:
    metadata:
      labels:
        app: queue-test
    spec:
      containers:
      - name: queue-test
        image: 
---
---
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: queue-test
  labels: {}
spec:
  scaleTargetRef:
    name: queue-test
  triggers:
  - type: azure-queue
    metadata:
      direction: in
      queueName: sample-queue
      connectionFromEnv: AzureWebJobsStorage

---
</code></pre>

Lakmal
<p>Pods getting terminated after 5 minutes could be due to Kubernetes Liveness Probes, Pod resource limits, or KEDA scaling behavior.</p>
<p>Steps to debug:</p>
<ol>
<li>Check pod logs: kubectl logs &lt;pod_name&gt; --previous.</li>
<li>Adjust Liveness Probe parameters or disable it.</li>
<li>Increase resource limits in your Kubernetes Deployment.</li>
<li>Review and adjust KEDA trigger sensitivity.</li>
</ol>
<p>I hope this helps!</p>
