I have an application that pings a bunch of servers. It runs great for days, but suddenly will have many failures of one of two types:
WSA_QOS_ADMISSION_FAILURE (11010) "A QoS error occurred due to lack of resources"
or
ERROR_NOACCESS (998) "Invalid access to memory location."
The odd thing is the errors come in bunches. Ie all pings might fail for a few minutes with one of the above errors. Then it clears up. Later all pings will fail for a few minutes with the other error. They don't seem to ever interleave.
This happens on Windows 2008 R2. I can't reproduce it at will, but if I wait for a day or two, it always happens again.
I checked and rechecked, then checked again to ensure I close all handles that were opened.
It never happens when the app first starts, so doesn't seem to be related to finding or loading DLLs. And it fixes itself after a while, so doesn't seem to be resource exhaustion. And it runs just fine for days, so it doesn't seem to be an API usage problem.
At a loss here. Does anyone have any ideas?
Thanks