base code is not working if i hit more than 5 conc...
# ask-ai
c
base code is not working if i hit more than 5 concurrent calls
t
Thanks for reaching out, N. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks so much for reaching out! To better assist you, could you please help me understand a few details? • When you mention the "base code," could you share a bit more about which one you mean? For instance, is it related to LiveKit SDKs, a specific example like llama.cpp, or perhaps some custom code you’re working with? • What exactly happens when you go beyond 5 concurrent calls? Are you seeing timeouts, crashes, or maybe requests getting rejected? • Are you running this in a deployed environment? If yes, do you have any concurrency limits set up, like max replicas or thread limits? • Lastly, is this issue happening during a simulation or in a live production setting? Sources: Going beyond a single-core | Tests/LiveKitCoreTests/ThreadSafetyTests.swift | cerebrium/cerebrium.toml | livekit-agents/livekit/agents/inference/llm.py | tools/server/server.cpp
c
only llm asr tts pipeliine sample code
t
It seems the issue with the LLM, ASR, and TTS pipeline sample code not working beyond 5 concurrent calls is probably because of the default concurrency limits in LiveKit Cloud. These limits are: • 5 active sessions for STT and TTS. • 5 concurrent sessions for the inference service. Here are some steps that might help you resolve this: 1. Consider upgrading your plan to increase the concurrency limits. Higher-tier plans usually offer more capacity. 2. Keep an eye on your usage through the LiveKit Cloud dashboard to make sure you’re within the limits. 3. If needed, you can request a quota increase. 4. Try implementing client-side throttling with tools like
asyncio.Semaphore(5)
to queue requests and prevent going over the limits. Could you please let me know if you’re using LiveKit Cloud or if you’re self-hosting? Also, are you seeing any specific error codes like 429 or connection refused when the limit is hit? This info will really help me guide you better. Sources: LiveKit Pricing | Quotas and limits | LiveKit Docs | Introducing LiveKit Inference: A unified model interface for voice AI | Introducing LiveKit Inference: A unified model interface for voice AI | agent-examples/agent_examples/pipeline_agent.py