Duplicate job requests for the same call in LiveKit can occur due to several factors:
•
Worker Assignment Race Conditions: Simultaneous assignment attempts for the same job ID can lead to duplicates. LiveKit has built-in protections to detect and prevent this.
•
Participant Identity Conflicts: Rapid successive connections or reconnections from the same participant identity can trigger duplicate job scenarios.
•
Job Distribution System Behavior: If a worker fails to accept a job within the timeout period, the job may be reassigned, potentially causing duplicates if the original acceptance arrives late or multiple workers respond simultaneously.
•
Simultaneous Call Scenarios: Concurrent calls from the same source can create conditions for duplicate job requests if not properly managed.
•
Track Publishing Conflicts: Issues with media track management during call setup can also result in duplicate requests.
To address this issue, you may need to investigate the timing and sequence of job assignments, participant connections, and worker responses. If you require further assistance or specific troubleshooting steps, let me know.
Sources:
pkg/agent/worker.go |
livekit-agents/livekit/agents/job.py |
Deploying to production | LiveKit Docs |
pkg/sip/service_test.go