lively-kangaroo-52184
02/13/2026, 10:49 PMtall-airline-16756
02/13/2026, 10:49 PMtall-airline-16756
02/13/2026, 10:50 PMlively-kangaroo-52184
02/13/2026, 10:53 PMtall-airline-16756
02/13/2026, 10:53 PMnum_idle_processes to 6 on one VM and observe whether the frequency or magnitude of the delay changes for calls dispatched to that VM.
• Temporarily move a test worker VM into the same cloud region as the LiveKit project (I’ll confirm your project region after you share the ID) and run tests to compare TTA.
• If possible, create a second SIP Dispatch Rule that creates a deterministic room name for a test caller and validate whether that changes dispatch latency (to rule out any lookup/pathology in the rule evaluation).
5) Capture a full trace for a single call
• Action for you: For one test call, capture these timings and response metadata:
◦ SIP INVITE arrival time at LiveKit SIP bridge
◦ Any LiveKit event times you can access (room create, participant join, dispatch decision, dispatch send)
◦ Worker entrypoint start time and any logs from the worker showing when it received the dispatch RPC
• Why: A full trace will let us correlate exactly where the multi-second gap occurs inside LiveKit.
What I’ll do after you provide the project ID and timestamps
• Confirm the LiveKit Cloud region for your project and call out any cross-region mismatch with your West US workers.
• Correlate the timelines you provide and point to the most likely internal component (dispatch evaluation, enqueueing, routing, or worker assignment) and recommend an exact remediation path (region move, worker config change, or rule tweak).
• Suggest targeted tests to verify the suspected cause (for example, reproducing with a worker in the same region, or using higher num_idle_processes).
If you prefer, give me:
• The LiveKit project ID
• 3 example calls’ timestamp sequences (those you already used are perfect)
and I’ll start by confirming your project region and correlating timelines. Thanks — you’re close to a deterministic trace; with the project ID and a couple more samples I’ll map the delay to the exact step and recommend the fastest fix.lively-kangaroo-52184
02/13/2026, 10:55 PMtall-airline-16756
02/13/2026, 10:56 PMnum_idle_processes (idle slots) as available. Below are practical ways to check, ranked by ease. Pick whichever fits your setup.
1) LiveKit Console / Project UI
• If you have access to the LiveKit Cloud console for your project, check the worker or dispatch dashboard for registered workers and their reported idle process count. Look for each worker instance and verify the displayed idle slots (should show 3 per worker given your config).
• If you see fewer idle slots than expected around the time of an affected call, that indicates LiveKit didn’t consider those processes available at dispatch time.
2) Worker logs (recommended)
• In your worker startup logs you should see the registration/heartbeat logs where the worker reports num_idle_processes=3. Search your logs for the registration/heartbeat entries and note timestamps.
• For each problematic call, match the timestamp when LiveKit dispatched the job (you already use worker entrypoint start time). Immediately before that dispatch time, confirm the most recent worker heartbeat log showed 3 idle slots.
• Example things to look for in logs:
◦ Worker registration: "registered worker, idle_slots=3" (or similar wording)
◦ Periodic heartbeat entries with current idle slot count
◦ Any log entries showing idle slots dropping to 0 or being adjusted
3) Worker metrics / telemetry (Prometheus, Cloud metrics)
• If your workers export metrics (Prometheus, Azure Monitor, etc.), look for a metric that reports idle processes or worker capacity. Query the metric for the time window around affected calls and confirm it stayed at 3.
• Useful queries:
◦ Check the gauge that represents idle slots per worker. If you don’t have a specific gauge, look for worker_process_count, worker_idle_count, or similar names.
◦ Plot that metric for the host/VM that received the problematic calls and check for dips at the timestamps you recorded.
4) LiveKit SDK or Control-plane logs (if available)
• Some LiveKit control/dispatch logs show assignment events and the worker state at assignment time. If you can access any LiveKit-side logs for your project (console or log export), inspect the dispatch assignment record for the call and see what idle slots were known at that moment.
5) Quick live test you can run now
1. Temporarily enable verbose logging on one worker VM.
2. Generate a test incoming call that you can control.
3. Observe the worker logs for registration/heartbeat, then watch for the assignment log when the call arrives.
4. Confirm that prior to assignment the logs show idle=3 (or equivalent) and that assignment occurs immediately after.
What to share back
• A few example log lines showing worker registration/heartbeat with idle slot counts and the timestamps around problematic calls.
• Any metric query or graph that shows idle slots per worker for a 30–60s window around a delayed call.
If you share one example (worker heartbeat log lines + the worker entrypoint start timestamp for the same call), I’ll help correlate and interpret whether LiveKit saw the idle slots available at dispatch time and what that implies for the 5–6s delay.lively-kangaroo-52184
02/13/2026, 10:57 PMtall-airline-16756
02/13/2026, 10:57 PMnum_idle_processes field showing the configured and currently available count (should show 3 configured, and a current available count).
• Recent heartbeat or registration timestamp that indicates when the worker last reported state.
• Any status indicators like “Healthy”, “Busy”, or counts of busy vs idle processes.
3) Dispatch / Assignment logs
• From the same project, open the “Dispatch” or “Assignments” view (sometimes a tab under Workers or a separate Dispatch dashboard).
• Find recent dispatch events for the timeframe of your problematic calls.
• For each dispatch event, inspect the record to see which worker was chosen and whether the event shows the worker’s idle slot count at assignment time.
4) Project region info
• In Project Settings (often under the project name or a settings gear), locate the “Region” or “Deployment Region” field to confirm which LiveKit region your project is pinned to.
5) If you don’t see explicit “idle slots” info
• Check worker details for lines like “registered with num_idle_processes=3” or heartbeat logs exposed in the console.
• Check the worker’s recent events for “process started”, “process busy”, or “process available” entries.
If you prefer, paste the exact top-level menu items you see in your console (left nav list) and I’ll point to the exact menu to click. Or share your project ID and I’ll confirm the region for you and guide the exact panel names to check.lively-kangaroo-52184
02/13/2026, 11:01 PMtall-airline-16756
02/13/2026, 11:01 PMnum_idle_processes.
Where to check idle slots in the LiveKit console (quick steps)
1. Open the LiveKit Cloud console and select your project.
2. Navigate to the left-hand menu and open the “Workers” / “Dispatch” / “Agents” section.
3. Click an individual worker (one of your Azure VMs). In that worker detail pane look for:
◦ Idle slots / idle processes / num_idle_processes — it should show the configured value (3) and the currently available count.
◦ Last heartbeat / registration timestamp — confirms when the worker last reported state.
◦ Status indicators like Healthy / Busy and counts of busy vs idle processes.
1. Optionally open the “Dispatch” or “Assignments” view and inspect recent dispatch events. For a delayed call, check which worker was chosen and whether the record shows the worker’s idle count at assignment time.
If the console UI labels differ, paste the top-level menu names you see and I’ll point to the exact panel.
How 4 vCPUs relates to num_idle_processes=3
• Each idle process consumes CPU when it becomes active; the 3 idle processes per VM is typically reasonable on a 4‑vCPU machine for handling multiple simultaneous short-lived dispatch jobs.
• However, CPU count alone doesn’t guarantee immediate assignment — other factors (worker heartbeat timing, process scheduling, or control-plane timing) affect whether LiveKit sees those idle slots as available at the exact moment of dispatch.
Quick checks to validate capacity and behavior
• In the worker detail pane or logs, confirm you consistently see idle=3 in the heartbeat/registration entries immediately before a delayed dispatch.
• Temporarily increase num_idle_processes on one VM (for example to 5–6) and run controlled tests to see if the frequency of 5–6s delays drops for calls routed to that VM. If delays reduce, it suggests a timing/slot-availability effect rather than pure CPU starvation.
• Enable verbose worker logging on one VM and capture the registration/heartbeat + dispatch assignment logs for a single test call to produce a full timing trace.
If you want, I can:
• Confirm your project’s LiveKit region (I only need the project ID).
• Walk you through exactly what log lines to paste from your worker so I can interpret whether LiveKit saw the idle slots at dispatch time.
Which would you like to do next — confirm the region, increase idle processes for a short test, or capture a sample of worker heartbeat logs?lively-kangaroo-52184
02/13/2026, 11:02 PMtall-airline-16756
02/13/2026, 11:02 PMnum_idle_processes higher than the number of vCPUs on the VM.
Why not (brief):
• CPU contention: When a job starts an idle process becomes active and uses CPU. If you have more active processes than vCPUs, they contend for CPU time, increasing context switches and causing latency spikes rather than reducing latency.
• Diminishing returns: Idle processes help by pre-warming memory and models, but more idle processes than cores doesn’t improve throughput and can make start times worse when several wake at once.
• Best-practice sizing: For predictable performance, size num_idle_processes at or slightly below vCPU count. For typical voice agent workloads, LiveKit guidance starts at roughly 4 cores and 8 GB per agent server.
What to do instead (practical next steps):
• Keep num_idle_processes ≤ number of vCPUs (so with 4 vCPUs, use 3–4 idle processes).
• If you need more concurrent capacity, scale horizontally by adding worker VMs rather than packing more idle processes onto a single VM.
• Use prewarm or explicit warm-up logic (if your agent supports it) so heavy initialization happens before incoming calls.
• For troubleshooting your 5–6s dispatch delay, try a short test:
a. Keep num_idle_processes ≤ 4 on existing VMs.
b. Add one additional VM with the same config and run controlled calls to see if delay frequency drops.
This will tell you whether capacity/timing at the worker side is contributing.
If you want, I can:
• Help pick the right test parameters (how many extra VMs, test call cadence).
• Review a sample worker log showing registration/heartbeat + idle count if you paste it, so we can confirm LiveKit saw the idle slots at dispatch time. Sources: Troubleshooting Latency and Timeout Errors with Turn Detection on AWS | Server options | LiveKit Documentation | Self-hosted deployments | LiveKit Documentation | Agents (Python) | livekit/livekit_composite | DeepWiki