Help with issue: livekit dropping screen share frames in prod only

Here’s the production error message I see on the dashboard. My code simply samples frames at 1fps, stores them in a 1-frame-wide buffer, and then grabs the frame when the agent needs it. It works fine running livekit locally, but running on livekit cloud, we see this issue.

      "logRecords":  \[

        {

          "timeUnixNano":  "1776198170895523072",

          "observedTimeUnixNano":  "1776198170895739772",

          "severityNumber":  "SEVERITY_NUMBER_WARN",

          "severityText":  "WARN",

          "body":  {

            "stringValue":  "libwebrtc::imp::video_stream:231:libwebrtc::imp::video_stream - native video stream queue overflow; dropped 1 queued frames"

          },

          "attributes":  \[

            {

              "key":  "code.file.path",

              "value":  {

                "stringValue":  "/app/.venv/lib/python3.14/site-packages/livekit/rtc/\_ffi_client.py"

              }

            },

            {

              "key":  "code.function.name",

              "value":  {

                "stringValue":  "ffi_event_callback"

              }

            },

            {

              "key":  "code.line.number",

              "value":  {

                "intValue":  "174"

              }

            },

Did you see this sample code? Video | LiveKit Documentation. It sounds like the frames are backing up

@DarrynDarryn small typo: docs say self._video_stream.close() but I believe it should be aclose()

Thanks for raising this. I hadn’t tested that sample code myself but having tested it this morning I agree with you - I have raised a PR on our docs team so that should get updated soon.