0X00000FE1

Fix PEERDIST_ERROR_SERVICE_UNAVAILABLE (0X00000FE1) on Windows

Server & Cloud Intermediate 👁 7 views 📅 May 27, 2026

The BranchCache (PeerDist) service hasn't finished initializing when your app tries to use it. Usually happens right after boot or a service restart. Here's how to fix it.

You're running a script or an app that calls PeerDist (Windows BranchCache) right after boot or a service restart. You see error 0X00000FE1“PEERDIST_ERROR_SERVICE_UNAVAILABLE”. The message says the service is still initializing. And it's not lying. But here's the catch: it's not always a transient glitch. Sometimes the service genuinely takes too long to start, and your code needs to handle that delay.

Why this happens

The culprit here is almost always a timing issue. When Windows starts the PeerDist service, it doesn't just flip a switch. It loads the content cache database, opens communication channels, and validates the network location for hosted content. On a fresh boot, or if you've manually restarted the service, that process can take 10 to 30 seconds. Your app hits the API before that completes. Boom — 0X00000FE1.

Another common trigger: you've got BranchCache configured to use a hosted cache server, and that server isn't reachable yet. The service tries to connect, times out internally, and never fully initializes. The error code stays cached until a full service restart.

Less common but possible: a corrupted cache database. If the database file is large or damaged, the initialization hangs. That's the edge case we'll check last.

The fix — step by step

Step 1: Wait it out (seriously)

Before you start changing settings, add a 30-second delay in your calling code. If you're writing a PowerShell script, throw in a Start-Sleep -Seconds 30. In C#, use Task.Delay(30000). I've seen teams spend hours debugging this when all they needed was a sleep statement.

Step 2: Check the service status properly

Don't trust Get-Service alone — it shows the service as running long before it's ready. Use a more reliable check. Here's a PowerShell snippet that works:

do {
    Start-Sleep -Seconds 5
    $status = Get-Service -Name PeerDistSvc | Select-Object -ExpandProperty Status
} while ($status -ne 'Running')
Write-Host 'Service is running — now check if it accepts calls'
# Then add another 10-second delay
Start-Sleep -Seconds 10

That extra 10 seconds is the secret sauce. Without it, you'll still hit the error occasionally.

Step 3: Increase the service startup timeout

If waiting doesn't fix it, the default timeout for service initialization might be too low. You can raise it in the registry. Open regedit and go to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

Find the ServicesPipeTimeout DWORD. If it's not there, create it. Set the value in milliseconds — 60000 (60 seconds) works well. Reboot. This gives the PeerDist service more time to initialize before Windows kills it for being too slow.

Step 4: Reset the BranchCache cache

When a corrupted cache is the culprit, you need to nuke it. Run these commands as admin:

net stop PeerDistSvc
rd /s /q C:\Windows\ServiceProfiles\NetworkService\AppData\Local\PeerDist
net start PeerDistSvc

This deletes the cache database. The service rebuilds it on next start. Don't do this on a production server unless you're okay with a brief performance hit while the cache repopulates.

Step 5: Verify BranchCache configuration

If you're using a hosted cache server, check that the server is actually reachable. Run:

netsh branchcache show status
netsh branchcache show hostedcache

Look for the HostedCacheServerList entry. If it's pointing to a dead server, fix it. Remove and re-add the server with:

netsh branchcache reset
netsh branchcache set hostedcache mode=no
netsh branchcache set hostedcache mode=yes server=YourCacheServer

What to check if it still fails

If you've done all that and still see 0X00000FE1, it's time to dig deeper. Check the Event Viewer under Applications and Services Logs > Microsoft > Windows > BranchCache. Look for events with ID 58 or 59 — those usually point to database corruption or network issues.

Also verify that the PeerDist service account (NT AUTHORITY\NetworkService) has full control over its data directory. Corrupted permissions can prevent initialization silently. Use icacls to inspect:

icacls C:\Windows\ServiceProfiles\NetworkService\AppData\Local\PeerDist

If you see Access Denied, take ownership of the folder and grant NetworkService full control.

One more thing: if you're running Windows 10 Home or Pro without BranchCache enabled, the service won't initialize at all. Enable it via Control Panel > Programs > Turn Windows features on or off > BranchCache. Or just stop trying to use PeerDist — it's not available on that edition.

That's it. 90% of the time, it's a timing problem. Add a delay and move on.

Was this solution helpful?