Skip to content

Sometime unable to receive task message from livekit server  #834

Closed as not planned

Description

@Max-Thuc

When testing, I notice that sometime the agent doesn't receive the task even when the load is under the threshold. I put the log and found that the websocket didn't receive the task message as well. I looked at your implementation and found a issue:
In https://github.com/livekit/agents/blob/main/livekit-agents/livekit/agents/worker.py#L456 task, you use 1 async task for read and other async task for write from websocket. But in the documentation from the websocket library https://docs.aiohttp.org/en/stable/client_quickstart.html, it is listed that

You must use the only websocket task for both reading (e.g. await ws.receive() or async for msg in ws:) and writing but may have multiple writer tasks which can only send data asynchronously (by await ws.send_str('data') for example).

I think it means that you must use only 1 async task for both read and write. Please help to check and see if it is needed to fix it

Activity

  1. changed the title [-]Some time unable to receive task message from livekit server [/-] [+]Sometime unable to receive task message from livekit server [/+] on Oct 4, 2024
  2. added
    bug
    on Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions