When your Discord client loses connection to the voice or text server, it automatically tries to reconnect. On unstable networks, this reconnect process can fail repeatedly, causing messages to not send, voice channels to drop, and the client to show a spinning loading icon. The WebSocket reconnect backoff setting controls how long the client waits before each retry attempt. This article explains what the backoff is, how to adjust it using the developer console, and what settings work best for unstable connections.
Key Takeaways: WebSocket Reconnect Backoff for Unstable Connections
- Developer Console > Local Override > connectionBackoff: Adjusts the delay in milliseconds between reconnect attempts to reduce rapid retries on unstable networks.
- User Settings > Voice & Video > Reset Voice Settings: Resets all voice and WebSocket connection parameters to their defaults if custom settings cause issues.
- Windows 10 or Windows 11 > Control Panel > Network Troubleshooter: Diagnoses underlying network instability that triggers frequent reconnects.
What Is the WebSocket Reconnect Backoff in Discord?
Discord uses WebSocket connections to maintain a persistent link between your client and its servers for real-time messaging and voice activity. When the connection drops, the client attempts to reconnect automatically. The reconnect backoff is the delay the client inserts between each retry. By default, Discord uses an exponential backoff algorithm that starts at 1 second and doubles with each failed attempt up to a maximum of 60 seconds. This prevents the client from overwhelming the server with rapid retries when the network is temporarily down.
However, on unstable connections that drop frequently but come back quickly, the default backoff can be too aggressive. The client may wait too long between retries, causing noticeable delays in message delivery or voice recovery. Adjusting the backoff to a shorter, fixed interval can reduce these delays. Discord does not expose this setting in the user interface. You must modify it using the Developer Console, which is a built-in debugging tool accessible from within Discord.
Prerequisites for Adjusting the Backoff
Before you change the backoff, confirm that your connection is truly unstable. A stable connection does not require backoff changes. Use the following steps to check your network stability:
- Open Command Prompt and run
ping -t google.com. Let it run for 30 seconds. If you see “Request timed out” or spikes above 300 ms, your connection is unstable. - Open Discord and press Ctrl+Shift+I to open the Developer Console. Go to the Network tab. If you see frequent WebSocket disconnections (status 1006 or 1001), the backoff adjustment may help.
Steps to Set the WebSocket Reconnect Backoff in Discord
These instructions modify Discord’s local storage to override the default backoff value. The change applies to the current client session only. You must repeat the steps after restarting Discord if you want the setting to persist.
- Open the Developer Console
In Discord, press Ctrl+Shift+I on Windows 10 or Windows 11. If you are on macOS, press Command+Option+I. The Developer Console panel opens on the right side of the Discord window. - Switch to the Console Tab
At the top of the Developer Console, click the Console tab. This tab shows JavaScript logs and accepts commands. - Access the Local Override Object
Type the following command into the console and press Enter:window.webpackChunkdiscord_app.push([[Math.random()], {}, (req) => { window.webpack = req.c; }]);
This command exposes Discord’s internal module system. You only need to run it once per session. - Find the Connection Module
Type the following command and press Enter:let modules = Object.values(window.webpack).filter(m => m?.exports?.default?.connectionBackoff !== undefined);
If the command returns an array with one element, proceed. If it returns an empty array, the module name may differ. Try:let modules = Object.values(window.webpack).filter(m => m?.exports?.default?.backoff !== undefined); - Retrieve the Current Backoff Value
Type the following command and press Enter:let connectionModule = modules[0].exports.default; console.log(connectionModule.connectionBackoff);
The console displays the current backoff value in milliseconds. The default is typically 1000 (1 second). - Set a New Backoff Value
Type the following command, replacing2000with your desired value in milliseconds:connectionModule.connectionBackoff = 2000;
For unstable connections, use a value between 2000 and 5000 milliseconds. Lower values cause more frequent retries, which can help recover faster but may increase CPU usage. Higher values reduce retry frequency but increase recovery time. - Verify the Change
Typeconsole.log(connectionModule.connectionBackoff);again. Confirm that the console displays your new value. The change takes effect immediately for the next reconnect attempt.
Alternative Method: Using a Custom Script
If you want the backoff setting to persist across Discord restarts, you must run the commands each time you open Discord. You can automate this with a user script using a tool like BetterDiscord or a browser extension that injects JavaScript into the Discord client. This article does not cover third-party tools because they violate Discord’s Terms of Service and can lead to account suspension. Use the manual method described above.
If the Backoff Adjustment Does Not Improve Stability
Changing the reconnect backoff is a workaround, not a fix for the underlying network problem. If you still experience frequent disconnections after adjusting the backoff, the issue is likely with your network hardware, ISP, or Discord server region.
Discord Disconnects Every 5 Minutes Even After Backoff Change
This symptom indicates that the connection is timing out due to packet loss, not because of the backoff interval. Run a packet loss test using the command ping -n 100 google.com in Command Prompt. If you see more than 2% loss, contact your ISP or reset your router. Also, in Discord, go to User Settings > Voice & Video > Server Region and select a region closer to your physical location. A distant server increases latency and packet loss.
Bot Goes Offline After Backoff Change Does Not Apply to Bots
The backoff setting described in this article applies only to the Discord client application. If you run a Discord bot, you must configure the reconnect backoff in your bot’s code using the reconnectDelay parameter in the Client constructor. For example, in discord.js: const client = new Client({ intents: [...], reconnectDelay: 2000 });. Bots do not read the client’s local override.
User Settings > Voice & Video > Reset Voice Settings
If you have previously modified voice settings or used third-party voice plugins, resetting the voice settings can clear corrupted parameters that interfere with WebSocket reconnection. Go to User Settings > Voice & Video, scroll to the bottom, and click Reset Voice Settings. This action restores all voice and connection settings to their defaults, including the backoff. You will need to reapply the backoff override after the reset.
| Item | Default Backoff | Custom Backoff for Unstable Connections |
|---|---|---|
| Initial delay | 1000 ms (1 second) | 2000 to 5000 ms |
| Maximum delay | 60000 ms (60 seconds) | Same as initial (fixed delay) |
| Algorithm | Exponential backoff | Fixed interval |
| Persistence | Built-in, persists across restarts | Session-only, requires reapplication |
| Effect on CPU | Low | Slightly higher due to more frequent retries |
You can now adjust the WebSocket reconnect backoff in Discord to reduce recovery time on unstable connections. If the problem persists, run a network stability test and reset your voice settings from User Settings > Voice & Video. For bots, configure the reconnect delay in your bot code using the reconnectDelay parameter.