Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A WebSocket that drops at roughly 60 seconds with code 1006 may be hitting an idle timeout on a proxy or load balancer—but neither the timing nor the code identifies the component. Trace the connection hop by hop, find the shortest idle timeout, and ensure that WebSocket heartbeat traffic reaches the hop that needs to see activity.

What a 60-second drop and code 1006 tell you

A repeatable drop near 60 seconds is a useful diagnostic clue, not proof of a universal WebSocket limit. Nginx documents a 60-second default when its proxied server sends no data, and an AWS Application Load Balancer (ALB) also has a documented 60-second default connection idle timeout. Your deployment may use different settings, additional intermediaries, or a client-side timeout.

Code 1006 represents an abnormal closure: the connection ended without a WebSocket close frame. It describes how the connection ended, not which device or software component caused it. AWS explains the condition in its WebSocket API connect and disconnect documentation; this does not mean API Gateway must be part of your connection path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the hop that is closing the connection

  1. Reproduce it and record timestamps. Note when the connection opens, when application messages and heartbeats are sent, and when the client detects the drop. Compare client and server logs if available.
  2. Map the full route. Include the client, any CDN or edge proxy, load balancer, reverse proxy, and application server. Also check whether the client library has its own timeout or reconnect behavior.
  3. Inspect idle settings and logs at each hop. Look for the component whose timeout is close to the observed interval and whether it received traffic during the idle period. A heartbeat sent by the application is useful only if the relevant intermediary sees it as activity.
  4. Change one relevant setting or heartbeat behavior at a time. Then leave the connection idle beyond the previous failure window and verify that it still carries application traffic. An open socket alone does not show that the connection remains usable.

Check the common 60-second timeout settings

Nginx: upstream inactivity

Nginx’s WebSocket proxying documentation says the connection closes by default if the proxied server sends no data within 60 seconds. Check proxy_read_timeout and whether the upstream sends periodic WebSocket ping frames. Adjusting the timeout can accommodate longer idle periods; upstream ping frames can also keep this timer from expiring when they reach Nginx.

#1 Best Overall
Sale
TP-Link USB to Ethernet Adapter,Support Nintendo Switch,1Gbps,Plug and Play
  • 𝐇𝐢𝐠𝐡-𝐒𝐩𝐞𝐞𝐝 𝐔𝐒𝐁 𝐄𝐭𝐡𝐞𝐫𝐧𝐞𝐭 𝐀𝐝𝐚𝐩𝐭𝐞𝐫 - UE306 is a USB 3.0 Type-A to RJ45 Ethernet adapter that adds a reliable wired network port to your laptop, tablet, or Ultrabook. It delivers fast and stable 10/100/1000 Mbps wired connections to your computer or tablet via a router or network switch, making it ideal for file transfers, HD video streaming, online gaming, and video conferencing.
  • 𝐔𝐒𝐁 𝟑.𝟎 𝐟𝐨𝐫 𝐅𝐚𝐬𝐭𝐞𝐫, 𝐌𝐨𝐫𝐞 𝐒𝐭𝐚𝐛𝐥𝐞 𝐃𝐚𝐭𝐚 𝐓𝐫𝐚𝐧𝐬𝐟𝐞𝐫𝐬- Powered via USB 3.0, this adapter provides high-speed Gigabit Ethernet without the need for external power(10/100/1000Mbps). Backward compatible with USB 2.0/1.1, it ensures reliable performance across a wide range of devices.
  • 𝐒𝐮𝐩𝐩𝐨𝐫𝐭𝐬 𝐍𝐢𝐧𝐭𝐞𝐧𝐝𝐨 𝐒𝐰𝐢𝐭𝐜𝐡- Easily connect your Nintendo Switch to a wired network for faster downloads and a more stable online gaming experience compared to Wi-Fi.
  • 𝐏𝐥𝐮𝐠 𝐚𝐧𝐝 𝐏𝐥𝐚𝐲- No driver required for Nintendo Switch, Windows 11/10/8.1/8, and Linux. Simply connect and enjoy instant wired internet access without complicated setup.
  • 𝐁𝐫𝐨𝐚𝐝 𝐃𝐞𝐯𝐢𝐜𝐞 𝐂𝐨𝐦𝐩𝐚𝐭𝐢𝐛𝐢𝐥𝐢𝐭𝐲- Supports Nintendo Switch, PCs, laptops, Ultrabooks, tablets, and other USB-powered web devices; works with network equipment including modems, routers, and switches.

AWS Application Load Balancer: connection idle timeout

AWS documents a default ALB connection idle timeout of 60 seconds and a configurable range of 1 to 4000 seconds in its load balancer attributes documentation. Check the actual ALB setting rather than assuming the default is still in effect. AWS also states that HTTP/2 PING frames do not reset this timeout, so do not rely on them as a substitute for traffic the ALB recognizes as activity.

Cloudflare: heartbeat and timeout review

Cloudflare’s WebSockets guidance says an idle WebSocket can close when no data moves in either direction for a period. It recommends a client-side ping/pong heartbeat and reviewing client and origin timeout settings. The page does not give a general numeric WebSocket idle timeout, so do not apply a number from another Cloudflare connection limit without documentation that explicitly ties it to WebSockets.

Rank #2
Anker USB C to Ethernet Adapter, Portable 1 Gbps Network Hub
  • The Anker Advantage: Join the 65 million+ powered by our leading technology.
  • Instant Internet: Connect to the internet instantly from virtually any USB-C 3.0 device, and enjoy stable connection speeds of up to 1 Gbps.
  • Lightweight and Compact: The space-saving and portable design measures just over half an inch thick and weighs about the same as a AA battery.
  • Premium Build: Features a sleek aluminum exterior and braided-nylon cable to complement the design of high-end devices.
  • What You Get: PowerExpand USB-C to Gigabit Ethernet Adapter, welcome guide, 18-month worry-free warranty, and friendly customer service.

Choose a heartbeat that reaches the relevant intermediary

Set heartbeat frequency below the shortest applicable idle timeout in your actual route, with operational margin. There is no universal interval established by these vendor documents: the right value depends on the configured timeouts and whether the heartbeat type and direction count as activity at each hop.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Confirm which endpoint sends the heartbeat and which component receives it.
  • Verify that the heartbeat uses WebSocket traffic visible to the intermediary whose timer you need to reset. A protocol-level keepalive should not be assumed to count; AWS specifically excludes HTTP/2 PING frames for the ALB idle timeout.
  • Ensure the application responds to pings where required and that its WebSocket library is not suppressing or mishandling them.
  • Test a connection that remains idle longer than the original failure window, and check both ends’ logs to confirm it remains usable.

Increasing an idle timeout and sending heartbeats can be complementary. A longer timeout allows legitimate quiet periods; heartbeats can preserve an idle connection and help detect an unresponsive peer. Choose settings that also let the server identify dead connections and release resources.

Rank #3
Sale
UGREEN USB C to Ethernet Adapter, Plug and Play 1Gbps Aluminum Adapter
  • USB-C Meets 1000Mbps Ethernet in Seconds:UGREEN usb c to ethernet adapter supports fast speeds up to 1000Mbps and is backward compatible with 100/10Mbps network. Perfect for work, gaming, streaming, or downloading with a stable, reliable wired connection
  • Extend a Ethernet Port for Your Device:This ethernet to usb c adds a Gigabit RJ45 port to your device. It’s the perfect solution for new laptops without built-in Ethernet, devices with damaged LAN ports, or when WiFi is unavailable or unstable
  • Plug and Play: This Ethernet adapter is driver-free for Windows 11/10/8.1/8, macOS, Chrome OS, and Android. Drivers are required for Windows XP/7/Vista and Linux, and can be easily installed using our instructions. LED indicator shows status at a glance
  • Small Adapter, Big Attention to Detail: The usb c to ethernet features a durable aluminum alloy case for faster heat dissipation than plastic. Its reinforced cable tail and wear-resistant port ensure long-lasting durability. Compact size and easy to carry
  • Widely Compatible: The usbc to ethernet adapter is compatible with most laptops, tablets, smartphones, Nintendo Switch, and Steam Deck with USB-C or Thunderbolt 4/3 port, like MacBook Pro/Air, XPS, iPhone 17/16/15 Pro/Pro Max, Mac Mini, Chromebook, iPad

Check session routing after reconnects

If Cloudflare Load Balancer distributes WebSocket connections across origins, a reconnect may reach a different origin. When session state exists only on the original server, review Cloudflare’s session affinity documentation. Affinity addresses where a reconnect is routed; it is separate from diagnosing or extending an idle timeout.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When managed WebSocket services are an option

If maintaining heartbeat, timeout detection, and reconnection behavior across a self-managed proxy chain is not a good fit, a managed WebSocket service may be an alternative. A secondary technical guide names Ably, Pusher, and PubNub as services that handle these concerns. Evaluate their current documentation and behavior against your application requirements; their mention is not a claim that any one service fits every deployment.

Quick Recap

Best Value
Acer USB to Ethernet Adapter, USBC Hub Ethernet 1Gbps with 3*USB 3.0
  • Dual USB-A/C Port Design: This USB hub with ethernet adapter features dual connectors for both USB C and USB A devices, ensuring wide compatibility across laptops, tablets, and smartphones. It includes 1x Gigabit Ethernet port and 3x USB A 3.0 ports, all usable at the same time for smooth and efficient connectivity. 📌Note: When using USB-A to connect devices, please ensure the USB-C is securely attached to the USB-A connector.
  • Stable Gigabit Ethernet Adapter: Get fast, wired Internet up to 1000Mbps with this USB C to ethernet adapter. Backward compatible with 10/100Mbps networks for flexible connectivity across various setups. Ideal for streaming, gaming, and large file transfers. 📌Note: Ensure the RJ45 connector is plugged in securely in the port and use CAT6 & above Ethernet cable is required to reach 1 Gbps.
  • 5Gbps Data Transfer: Transfer large files, photos, and videos in seconds with this USB 3.0 hub supporting speeds up to 5Gbps—10× faster than USB 2.0. Backward compatible with USB 2.0 and 1.1 devices, this USB splitter expands one port into three for connecting keyboards, mice, and flash drives for everyday use. 📌Note: The three USB-A 3.0 ports share a total 5Gbps bandwidth.【NO HDMI port, NO USB-C data port, and NO PD charging】
  • Plug and Play: Reliable USB to ethernet adapter ready to use in seconds. Instantly connects with USB-A and USB-C devices including MacBook Pro/Air, iPad Pro, iMac, Surface Laptops, Chromebook, XPS, tablets, Steam, and smartphones. Works with Windows, macOS, Linux, Chrome OS, and Android. 📌XP/Win7 may need driver. Older systems may not recognize this product due to its USB 3.0 chip. Please refer to the “Installation Manual” to manually download and install the driver.
  • Durable & Portable Build: Made with sturdy aluminum alloy, this RJ45 to USB-C adapter delivers long-term durability, efficient heat dissipation, and stable performance for offices, corporate deployments, classrooms, and campus workstations—while its slim, portable form factor makes it ideal for business travel, educators, and mobile professionals.
Rank #4
Amazon Basics USB 3.0 to 10/100/1000 Gigabit Ethernet Internet Adapter, Compatible with Windows and macOS, Black
  • Connects a USB 3.0 device (computer/laptop) to a router, modem, or network switch to deliver Gigabit Ethernet to your network connection. Does not support Smart TV or gaming consoles (e.g.Nintendo Switch).
  • Supported features include Wake-on-LAN function, Green Ethernet & IEEE 802.3az-2010 (Energy Efficient Ethernet)
  • Supports IPv4/IPv6 pack Checksum Offload Engine (COE) to reduce Cental Processing Unit (CPU) loading
  • Compatible with Windows 8.1 or higher, Mac OS

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.