Urgent.News

What's breaking now, across thousands of outlets.

World

AWS ALB Idle Timeout Killed 14% of My Voice WebSockets at 60s

A user emailed me a screen recording. The AI voice agent asks a hard question. The user goes quiet for about a minute to think. Then they start talking, and nothing happens. A second later the app reconnects on its own and the agent cheerfully asks the first question again. That loop came from the AWS ALB idle timeout on WebSocket connections. No exceptions, no 5xx in the dashboards, just a load…

The AWS Application Load Balancer (ALB) idle timeout closes connections with no data flowing for 60 seconds, including WebSocket connections. This default applies to WebSockets as well. In the case of a voice app that only streams mic audio when the user is speaking, long pauses can result in the ALB dropping the connection after 60 seconds of silence.

The browser interprets this as close code 1006, which appears as a random network error. To prevent this, it is recommended to send a WebSocket ping from the server every 25 seconds and raise the ALB idle_timeout. Additionally, reconnecting should resume the session instead of restarting it.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in World

More from Saturday 31 October →