Why is the call closed with error after several conversations?

I created a custom LLM proxy on Retell and connected to my server via WebSocket. During web testing, the connection is always forcibly dropped after a few sentences.

The call log shows: “1009 The decoded text message was too big for the output buffer and the endpoint does not support partial messages.” However, the actual content sent is very short, only a few dozen words.

Has anyone encountered this? What could be the cause?

Detail logs:
2026-02-07 08:41:40.253 call_c5b3ec2c64ad0b7eb471ef2affb info: LLM ws closed: 1009 The decoded text message was too big for the output buffer and the endpoint does not support partial messages
2026-02-07 08:41:40.253 call_c5b3ec2c64ad0b7eb471ef2affb error: Call closed in error: The decoded text message was too big for the output buffer and the endpoint does not support partial messages
2026-02-07 08:41:40.253 call_c5b3ec2c64ad0b7eb471ef2affb info: Ending call: call_c5b3ec2c64ad0b7eb471ef2affb

The error “1009 The decoded text message was too big for the output buffer” typically indicates your WebSocket server is sending messages that exceed the buffer size limit, even if the actual text content appears short(1).

Common causes to check:

  1. Message format issues - Verify you’re sending properly formatted JSON strings for all WebSocket events(2). Each message should conform to the protocol specification with the correct response_type field(2).

  2. Server configuration - Some server setups have limitations. For example, Vercel edge functions and serverless functions cannot act as a WebSocket server(1). Check if your hosting platform supports WebSocket connections properly(1).

  3. Connection stability - Add logging in your WebSocket code to verify the connection is established and check if you receive messages from Retell server(1). You can add logging in your websocket message code to check if you receive the message from Retell server(1).

  4. Protocol compliance - Ensure your server sends the first message correctly (an empty response to let user speak first)(2). All message event types should be “text”, where the data attribute is a JSON object stringified(2).

Troubleshooting steps:

Test your WebSocket connection with Postman: open Postman, create a new WebSocket request, enter your WebSocket URL, click “Connect”, then navigate to the “Message” tab, enter “Hello”, and click “Send”(1). You should receive the message back in your server indicating a successful connection(1).

Check your endpoint protocol - HTTPS endpoints should use wss:// prefix for secure WebSocket connections, while HTTP endpoints should use ws:// prefix(1).

If issues persist, check https://status.retellai.com/ for any ongoing service disruptions(3), or contact support through Discord or Contact Sales(1).