mDNSResponder and discoveryd hanging in Yosemite: CPU spikes at 100%

Since updating to Yosemite, I have been seeing 100% CPU spikes. You will see message (like the ones pasted below) from the Console.app. For some reason, discoveryd and mDNSResponder start going wild. Most of the instructions found online tell us to restart /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist using launchctl. However in Yosemite, there is no com.apple.mDNSResponder.plist.

Solution
You must restart discoveryd like the following:

1
2
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist

Console error messages

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:70 Err:-1 Errno:61 Connection refused
1/23/15 2:20:59.358 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:20:59.477 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:26 Err:-1 Errno:61 Connection refused
1/23/15 2:20:59.478 PM Slack[16482]: tcp_connection_host_start 1929 DNSServiceCreateConnection failed: -65563
1/23/15 2:20:59.508 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:20:59.609 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:20:59.679 PM Google Chrome[15689]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:20:59.755 PM awacsd[265]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:20:59.774 PM coreaudiod[444]: 2015-01-23 02:20:59.774313 PM [BonjourBrowser] Retrying Bonjour start for _raop._tcp. after failure
1/23/15 2:20:59.775 PM coreaudiod[444]: 2015-01-23 02:20:59.774751 PM [BonjourBrowser] Retrying Bonjour start for _airplay._tcp. after failure
1/23/15 2:20:59.775 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:20:59.775 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:00.015 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:15 Err:-1 Errno:61 Connection refused
1/23/15 2:21:00.015 PM Slack[16482]: tcp_connection_host_start 1930 DNSServiceCreateConnection failed: -65563
1/23/15 2:21:00.300 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:00.360 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:00.513 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:00.614 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:00.666 PM sharingd[460]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:00.685 PM Google Chrome[15689]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:00.829 PM awacsd[265]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:00.841 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:00.841 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:01.117 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:01.177 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:01.301 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:01.365 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:34 Err:-1 Errno:61 Connection refused
1/23/15 2:21:01.366 PM Slack[16482]: tcp_connection_host_start 1932 DNSServiceCreateConnection failed: -65563
1/23/15 2:21:01.366 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:01.469 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:01.519 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:01.615 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:27 Err:-1 Errno:61 Connection refused
1/23/15 2:21:01.615 PM Slack[16482]: tcp_connection_host_start 1931 DNSServiceCreateConnection failed: -65563
1/23/15 2:21:01.670 PM sharingd[460]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:01.686 PM Google Chrome[15689]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:54 Err:-1 Errno:61 Connection refused
1/23/15 2:21:01.687 PM Google Chrome[15689]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:01.883 PM awacsd[265]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:11 Err:-1 Errno:61 Connection refused
1/23/15 2:21:01.883 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:01.883 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:01.883 PM awacsd[265]: RRMetaClientItem: DNSServiceQueryRecord: -65563
1/23/15 2:21:01.884 PM awacsd[265]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:02.122 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:02.180 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:02.307 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:30 Err:-1 Errno:61 Connection refused
1/23/15 2:21:02.307 PM Slack[16482]: tcp_connection_host_start 1933 DNSServiceCreateConnection failed: -65563
1/23/15 2:21:02.308 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:02.369 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:02.475 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:02.522 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:26 Err:-1 Errno:61 Connection refused
1/23/15 2:21:02.522 PM Slack[16482]: tcp_connection_host_start 1934 DNSServiceCreateConnection failed: -65563
1/23/15 2:21:02.522 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
1/23/15 2:21:02.674 PM sharingd[460]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:02.691 PM Google Chrome[15689]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:02.938 PM awacsd[265]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:02.938 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:5 Err:-1 Errno:61 Connection refused
1/23/15 2:21:02.938 PM coreaudiod[444]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:6 Err:-1 Errno:61 Connection refused
1/23/15 2:21:02.938 PM coreaudiod[444]: 2015-01-23 02:21:02.938188 PM [BonjourBrowser] ### Start browse for _raop._tcp. on if <any>, flags 0x7000000000100000 failed: -65563/0xFFFEFFE5 kDNSServiceErr_ServiceNotRunning
1/23/15 2:21:02.939 PM coreaudiod[444]: 2015-01-23 02:21:02.938754 PM [BonjourBrowser] ### Start browse for _airplay._tcp. on if <any>, flags 0x7000000000100000 failed: -65563/0xFFFEFFE5 kDNSServiceErr_ServiceNotRunning
1/23/15 2:21:02.939 PM coreaudiod[444]: 2015-01-23 02:21:02.939078 PM [BonjourBrowser] ### Browse for _raop._tcp. failed, retrying in 7349 ms: -65563/0xFFFEFFE5 kDNSServiceErr_ServiceNotRunning
1/23/15 2:21:02.939 PM coreaudiod[444]: 2015-01-23 02:21:02.939416 PM [BonjourBrowser] ### Browse for _airplay._tcp. failed, retrying in 7349 ms: -65563/0xFFFEFFE5 kDNSServiceErr_ServiceNotRunning
1/23/15 2:21:03.128 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:03.186 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:03.313 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
1/23/15 2:21:03.374 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:03.478 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
1/23/15 2:21:03.523 PM Slack[16482]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2

Leave a Reply

Your email address will not be published. Required fields are marked *