---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/31931#article
headline: "31931: Stream - Media - Media Discarded"
url: https://www.twilio.com/docs/api/errors/31931
inLanguage: en
dateModified: 2026-06-08T11:38:30.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 31931: Stream - Media - Media Discarded

Log Type: APPLICATION

Log Level: WARNING

## Description

Twilio sends this warning once per Stream when audio sent to a bidirectional Media Stream is discarded because the downstream buffer has overflowed. Twilio buffers outbound `media` messages and plays them in the order received. If buffered audio grows beyond 10 minutes, Twilio stops accepting more audio for that Stream.

### Possible causes

* Your WebSocket server sent `media` messages faster than Twilio could play them back on the Call.
* More than 10 minutes of audio was buffered for the Stream. After that limit is reached, no more audio is accepted.
* Your application kept queueing audio without tracking playback completion with `mark` messages.

### Possible solutions

* Send audio only on bidirectional Streams created with `<Connect><Stream>`. If you only need to receive audio, use a unidirectional Stream instead of sending `media` back to Twilio.
* Pace outbound `media` messages so the buffer can drain before you send more audio.
* Send a `mark` message after each `media` message and wait for the matching `mark` event before sending large amounts of additional audio.
* If you need to interrupt queued audio, send a `clear` message to empty the buffer before sending replacement audio.

#### Additional resources

* [Media Streams overview](/docs/voice/media-streams)
* [Media Streams WebSocket messages](/docs/voice/media-streams/websocket-messages)
* [TwiML `<Stream>` reference](/docs/voice/twiml/stream)
