livekit/livekit · info
packet is older than packet group start
Error message
packet is older than packet group start
What it means
A PacketGroup tracks packets starting from a minimum sequence number; a packet with a sequence number below that start is stale relative to the group and rejected with errOldPacket rather than being counted in bandwidth calculations.
Source
Thrown at pkg/sfu/bwe/sendsidebwe/packet_group.go:30
// See the License for the specific language governing permissions and
// limitations under the License.
package sendsidebwe
import (
"errors"
"time"
"github.com/livekit/protocol/logger"
"github.com/livekit/protocol/utils"
"go.uber.org/zap/zapcore"
)
// -------------------------------------------------------------
var (
errGroupFinalized = errors.New("packet group is finalized")
errOldPacket = errors.New("packet is older than packet group start")
)
// -------------------------------------------------------------
type PacketGroupConfig struct {
MinPackets int `yaml:"min_packets,omitempty"`
MaxWindowDuration time.Duration `yaml:"max_window_duration,omitempty"`
}
var (
defaultPacketGroupConfig = PacketGroupConfig{
MinPackets: 30,
MaxWindowDuration: 500 * time.Millisecond,
}
)
// -------------------------------------------------------------
View on GitHub (pinned to ee45c3f0b1)
Solutions
- None needed — stale packets are intentionally excluded from the estimate.
- If frequent, investigate packet reordering or feedback delay in the network path.
- Upgrade LiveKit for group-rollover refinements in send-side BWE.
- Monitor alongside 'packet group is finalized' logs to spot boundary churn.
Defensive patterns
Strategy: try-catch
Try / catch
if err := opg.Add(pi, sendDelta, recvDelta, isLost); err != nil {
if errors.Is(err, errOldPacket) { return /* stale, skip */ }
if errors.Is(err, errGroupFinalized) { /* start new group */ }
} Prevention
- Ignore errOldPacket — stale packets must not affect estimates.
- Sequence packet feedback monotonically before feeding the detector.
- Avoid replaying buffered deltas after group rollover.
- Correlate with errGroupFinalized logs to detect boundary churn.
When it happens
Trigger: onPacketReceived delivering a transport-cc packet whose sequence number precedes the current group's minSequenceNumber — typically after group rollover or when processing buffered/delayed feedback.
Common situations: Reordered packet arrival across group boundaries; delayed send/recv delta reports being fed after a new group started; burst catch-up after a processing stall.
Related errors
- packet group is finalized
- datatrack is closed
- participant session is already closed
- data channel is not available
- data channel buffer is full
AI-assisted analysis of livekit/livekit@ee45c3f0b1 (2026-09-02).
Data as JSON: /api/errors/e15124736c71661a.
Report an issue: GitHub.