Fix for Windows 10 exhausted pool of TCPIP ports

Lately one of my Windows 10 machines started to behave quite strange, after about a day of use, browsing Internet was no longer possible. I could still ping resources, but not use any browser or other application requiring Internet access. A reboot fixed the problem, and then after about a day, sometimes less, the same thing happened.

After some research / troubleshooting I found the following in the event log

Event 4231: A request to allocate an ephemeral port number from the global TCP port space has failed due to all such ports being in use.

The event log error.

The fix

After some additional research I came across some posts on similar issues for Windows Server 2012 R2, but not Windows 10. But I decided to try the same configuration that fixes the problem on Windows Server 2012 R2, and voila. it worked.

Note: Feature updates (version upgrades) to Windows 10 is sometimes removing these values, so after upgrade, check that they are still there.

Simply create the following registry info:


REG_DWORD: 0000001e (hex)

REG_DWORD: 0000fffe (hex)

REG_DWORD: 00fffffe (hex)

REG_DWORD: 00000005 (hex)

The info added to my Windows 10 machine.

About the author

Johan Arwidmark

5 5 votes
Article Rating
Notify of
Oldest Most Voted
Inline Feedbacks
View all comments
Mohamed Anis
Mohamed Anis
1 year ago

Before anything, thank you for this post and for your time.
I hope someone is watching this page as I would like to ask: Can this fix be applied to Windows 11 as well?
I have the exact same problem.


Event 4231, Tcpip
A request to allocate an ephemeral port number from the global TCP port space has failed due to all such ports being in use.

1 year ago

Omg thank you!!! This was driving me insane!

2 years ago

Thanks man! You saved my Integration Tests 😀 😀 😀

3 years ago

Just wanted to say thank you for creating this article. I'm hopeful it will address my issue. The behavior you summarized aligns with what I was seeing.   To expand on the behavior and my observations some, I could not access any IPv4 websites using my browser, but IPv6 sites would work (e.g. I could search in google, but not open a link unless it was cached). Using cmd, I could ping websites and domain names, but using my browser NO IPv4 domain names or ip addresses would work. For example, I could not even connect to my router/gateway by… Read more »