Quick answer for advanced users
Kill idle processes to free file handles, or increase the IrpStackSize registry key under HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters to 24 or higher. Reboot after.
Why this happens
I know this error is infuriating — you're just trying to play a video or stream from a network share, and suddenly Windows Media Player throws NS_E_OPEN_FILE_LIMIT (0XC00D0031). It translates to "The client cannot have any more files open simultaneously." That's not a lie — it's hitting a real wall.
Here's the deal: Windows limits how many file handles a single process can open. By default, the server-side limit (for network shares) is 16384 handles per computer, but the client-side limit is lower. If you've got Chrome with 50 tabs, a file explorer with 10 folders, and a bunch of background apps all holding files open, you'll hit this limit fast. I've seen it happen when someone streams a 4K video from a NAS while running a backup tool that also opens hundreds of files. The system just says "no more."
Fix steps
- Close unnecessary programs — especially browsers, file explorers, and media players. This frees up handles instantly. Try playing the file again.
- Check handle count — download Sysinternals Process Explorer (free from Microsoft). Run it, press Ctrl+H, then sort by "Handles." Look for processes with >10,000 handles. Chrome and Firefox are common culprits. Kill or restart them.
- Increase the IrpStackSize — this is the real fix for network shares:
- Open Regedit as Administrator.
- Go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters - Create a DWORD (32-bit) named
IrpStackSizeif it doesn't exist. - Set its value to
24(decimal). This gives the server more I/O request packet stack space. - Reboot the machine.
- Increase MaxMpxCt — if you're on a network share, also check this key under the same path:
MaxMpxCt. Set it to2048(decimal) to allow more simultaneous client requests. - Disable Windows Media Player network sharing — if you don't need streaming from other devices, open WMP, go to Tools > Options > Library, and uncheck "Share my media." This reduces handles.
Alternative fixes if the main one fails
- Use a different player — VLC Media Player handles file limits more gracefully. It won't fix the underlying issue, but it might bypass the error for that file.
- Restart the Server service — run
net stop lanmanserver && net start lanmanserverin an elevated command prompt. This flushes open handles on the server side. - Check for malware — sometimes crypto-miners or other junk hold thousands of handles. Run Malwarebytes or Windows Defender Offline scan.
- Increase system-wide handle limit — this is rare, but you can edit
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PoolUsageMaximumto a higher value (like 64). Reboot required.
Prevention tip
Stop letting apps run wild. Use a tool like Handle (from Sysinternals) to periodically check which processes are hogging resources. Set a monthly reminder to reboot your PC — it clears stale handles. Also, ditch Chrome if you're a tab hoarder like me. Firefox with a tab suspender uses way fewer handles. Your video player will thank you.