# Networking: Your Remote Desktop Services session has ended. Possibly the network connection was lost / Remote Desktop disconnected, error code 0x904

**Code:** `Your Remote Desktop Services session has ended (network problem)` · **Category:** Networking · **Seen on:** Windows, Networking

An established Remote Desktop session dropped because the network under it stalled or the session was reset.

## Meaning

Look for Wi-Fi roaming, VPN reconnects, MTU problems or firewalls that cut idle sessions. Enable keep-alive on the RDP client/server, use UDP transport or reduce bandwidth settings, check the session limits in Group Policy, and review event 40 in the TerminalServices-LocalSessionManager log.

## Common causes

- Unstable Wi-Fi or VPN underneath
- Firewall/NAT idle timeout dropping the TCP session
- MTU/fragmentation problems on the VPN
- Server idle/disconnect session limits
- Packet loss or high latency

## Quick fix

1. Use a wired connection or stable VPN
2. Enable keep-alives (Group Policy: Configure keep-alive connection interval)
3. Lower the VPN MTU and allow RDP UDP 3389

## Detailed fix by platform

### Windows

1. 

```powershell
eventvwr.msc   # Applications and Services Logs > Microsoft > Windows > TerminalServices-LocalSessionManager
Test-NetConnection server -Port 3389
```


## How to diagnose

1. **Underlying link** — Stable?
2. **Keep-alive** — Enabled?
3. **Limits** — Session timeouts set?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/networking/rdp-session-ended-network-problem)
