I ran into this issue on macOS, in an application running a large number of sockets.
dnssd/servus.h sources use select() API calls inside of _handleEvents(). This only works well until the file descriptor reaches FD_SETSIZE. There is an error checking code for a valid file descriptor, but this code does not consider the fact that fd can be larger than zero and still invalid:
assert(fd >= 0);
if (fd < 0)
return servus::Servus::Result(kDNSServiceErr_BadParam);
To continue using select() API call, one would need to check for it to be lower than FD_SETSIZE, but a better fix would be to switch to using poll() and WSAPoll() API calls.