u/DdongSim

[Airflow 3.1.8] Postgres lock contention on task_instance with 150+ K8s workers

Hi everyone,

​We are running Airflow 3 on KubernetesExecutor and hitting a scaling bottleneck.

​The Problem:

Once we hit ~150 concurrent workers, we see heavy lock contention on the task_instance table.

- ​Specifically during SELECT ... FOR UPDATE (scheduler) and UPDATE (task state changes).

- ​DB wait events show high Lock:transactionid times.

​Our Setup:

- ​Airflow 3.1.8

- ​Postgres + PGBouncer (Transaction mode)

- ​DB CPU/RAM usage is fine; the issue is purely row-level locking.

​Has anyone else faced this at scale with Airflow 3? Are there specific scheduler configs or Postgres tuning you’d recommend to reduce this contention?

​Thanks!

reddit.com
u/DdongSim — 4 days ago

Hi!

​I was wondering if there is a specific setting to limit or cap the thinking tokens in KiloCode. If so, how can I configure it?

and Does it have a code approval feature? ​Is there a way to view modified code in a git-diff style (side-by-side) in a new window?

reddit.com
u/DdongSim — 10 days ago

I’ve been tracking the usage data between Cline and GitHub Copilot while working on the same set of tasks. I haven't dived into the why yet, but here are the raw results of my comparison.

​📊 The Results

- ​Tokens per Request: Cline used ~30% fewer tokens on average per request compared to Copilot.

- ​Number of Requests: Cline required ~50% fewer requests to complete the same tasks.

​📝 Summary

​In short, for my workflow, Cline is hitting the mark with significantly less data overhead and fewer rounds of prompting. I'm just sharing these numbers as-is for those interested in tool efficiency.

reddit.com
u/DdongSim — 13 days ago