APSD is using a lot of memory on MacOS High Sierra (Virtual Machine)

Hi guys,


I've set up three Virtual Machines on my MacPro, I use them as servers. MacOS version is High Sierra.


I'm getting some trouble with APSD process, that is using up to 6GB of ram!


Now that's what happens: I kill the process (just go into Activity Monitor -> select the process -> "Exit").

It frees up the memory and it's fine. But slowly memory size of the process start to grow. This morning the process was using just 17MB. Now (evening) is using 600MB and continue to grow. Tomorrow I will be forced to kill again the process to free memory up.


I already read everything about this process and Push Notification etc.


This is a big issue for us since our clients platform runs on these servers and we had kernel panic and strange reboot last week due to this APSD process using all memory!


I print here some of the thousands of logs related to APSD.


default18:29:55.929464 +0200apsd<private>: Stream processing: complete yes, invalid no, length parsed 36, parameters <private>
default18:29:55.929513 +0200apsd<private>: Received NoStorage message, users potentially with messages = 1, parameters = <private>
default18:29:55.929549 +0200apsd<private>: Stream processing: complete no, invalid no, length parsed 0, parameters (null)
default18:29:55.953006 +0200apsd<private>: Outstanding data received: <private> (length 4)
default18:29:55.953131 +0200apsd<private>: Stream processing: complete yes, invalid no, length parsed 4, parameters <private>
default18:29:55.953179 +0200apsd<private>: Received NoStorage message, users potentially with messages = 0, parameters = <private>
default18:29:55.955487 +0200apsd<private>: Stream processing: complete no, invalid no, length parsed 0, parameters (null)
default18:29:55.975337 +0200apsd<private>: Outstanding data received: <private> (length 36)
default18:29:55.975410 +0200apsd<private>: Stream processing: complete yes, invalid no, length parsed 36, parameters <private>
default18:29:55.975459 +0200apsd<private>: Received NoStorage message, users potentially with messages = -1, parameters = <private>
default18:29:55.975495 +0200apsd<private>: Stream processing: complete no, invalid no, length parsed 0, parameters (null)
default18:29:56.013202 +0200apsd<private>: stream end event!
default18:29:56.013252 +0200apsdClosing <private> with environment <private>[production]
default18:29:56.013377 +0200apsdTCP Conn 0x7fb4f87f2860 canceled
default18:29:56.013474 +0200apsd[11586 <private> stream, pid: 4726] cancelled
[11586.1 B870118E-56E9-416A-A898-11074F6C828D <private>.52153<-><private>]
Connected Path: satisfied (Path is satisfied), interface: en0, ipv4, dns
Duration: 0.582s, DNS @0.000s took 0.104s, TCP @0.105s took 0.022s
bytes in/out: 4264/2496, packets in/out: 16/16, rtt: 0.022s, retransmitted packets: 1, out-of-order packets: 0
default18:29:56.015301 +0200apsd<private>: Stream end encountered for <private>
default18:29:56.015527 +0200apsd<private> setting isConnectedToService NO
default18:29:56.015772 +0200apsd<private> asked to change isConnected=YES to NO
default18:29:56.016605 +0200apsd<private> received courierConnectionStatusDidChange from <private>. isConnected? NO
default18:29:56.016866 +0200apsd<private>: Set active push connection state to YES
default18:29:56.017014 +0200apsd<private>: Closing <private> with environment production
default18:29:56.017161 +0200apsdConnection closed production
default18:29:56.017322 +0200apsd<private>: Moving 0 unsent messages to the end of queue
default18:29:56.022009 +0200apsd<private>: Changing status for user 0 darkWakeEnabled from connected to disconnected
default18:29:56.023991 +0200apsd<private>: Changing status for user <private> from connected to disconnected
default18:29:56.024625 +0200apsd<private>: Changing status for user 0 from connected to disconnected
default18:29:56.028820 +0200apsd<private>: Changing status for user <private> from connected to disconnected
default18:29:56.032192 +0200apsd<private>: Disconnected in response to connection failure. (Consecutive failures: 1)
default18:29:56.033124 +0200apsd<private>: Adjusting connection with courier connectable
default18:29:56.036523 +0200apsd<private>: <private>: reachability 0x02
default18:29:56.038825 +0200apsd<private>: Connecting stream
default18:29:56.045065 +0200apsdFailed to talk to secd after 4 attempts.
default18:29:56.046557 +0200apsd<private>: Requesting keep alive proxy for environment production
default18:29:56.046668 +0200apsd<private>: Connecting courier stream using configuration bag at <private>
default18:29:56.046776 +0200apsd<private>: Opening <private> with environment production using method 0/0
default18:29:56.046885 +0200apsdOpening <private> with environment <private>[production]
default18:29:56.046988 +0200apsdloadConfigurationForEnvironment: <private> production
default18:29:56.047156 +0200apsdCalling configuration completion blocks <private> expiration date Thu Aug 23 18:58:06 2018 error: (null)
default18:29:56.047705 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.047974 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.048105 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.048155 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.048438 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.048829 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.049498 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.049584 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.049628 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.049668 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.049757 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.049948 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050071 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050193 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050281 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050334 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050374 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050414 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050447 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050492 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.050533 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051073 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051218 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051562 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051641 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051678 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051714 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051768 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051803 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051853 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051888 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051921 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.051976 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.052010 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.052266 +0200apsdAPSTCPStream <private> got config <private>
default18:29:56.052309 +0200apsd<private> setNumberOfCriticalMessageFlushesBeforeDisconnecting: changing from 3 to 3 (got number 3)
default18:29:56.052347 +0200apsd<private> setCriticalMessageKeepAliveTimerDuration: changing from 10.000000 to 10.000000 (got number 10)
default18:29:56.052382 +0200apsd<private> setCriticalMessageTimeout: changing from 10.000000 to 10.000000 (got number 10)
default18:29:56.052417 +0200apsd<private> setForcedShortTimeoutInterval: changing from 2.000000 to 2.000000 (got number 2)
default18:29:56.052451 +0200apsd<private>: slowReceiveThresholdNum = 60
default18:29:56.052485 +0200apsd<private>: keepAliveV2TimeDriftMaximum = 30
default18:29:56.052518 +0200apsd<private>: lastIPCachingPercentage = 0
default18:29:56.052549 +0200apsd<private>: lastIPCachingTTLMinutes = 1440
default18:29:56.052581 +0200apsd<private>: nagleEnabled is not available from config bag, default NO
default18:29:56.052615 +0200apsd<private> env isLoadBalanced, using server count 50 and hostname <private>
default18:29:56.052658 +0200apsd<private>
default18:29:56.052767 +0200apsd<private> Set _kCFStreamSocketSetNoDelay = YES on writeStream {Succeeded: YES}
default18:29:56.052901 +0200apsdTCP Conn [77123:0x7fb4f87f7f20] using empty proxy configuration
default18:29:56.052927 +0200apsdStream client bypassing proxies on TCP Conn [77123:0x7fb4f87f7f20]
default18:29:56.052950 +0200apsdTCP Conn 0x7fb4f87f7f20 started
default18:29:56.053162 +0200apsd[11587 <private> <private>] start
default18:29:56.053166 +0200apsd<private>: Connecting to courier <private> with stream: <private>
default18:29:56.053958 +0200apsdLooking up connection on peer: 1252ac00 found <private>
default18:29:56.054121 +0200apsdLooking up connection on peer: 1251fb80 found <private>
default18:29:56.054305 +0200apsdLooking up connection on peer: 1254e230 found <private>
default18:29:56.054513 +0200apsdLooking up connection on peer: 1254e330 found <private>
default18:29:56.055817 +0200apsdLooking up connection on peer: 1252ac00 found <private>
default18:29:56.056134 +0200apsdLooking up connection on peer: 1251fb80 found <private>
default18:29:56.056378 +0200apsdLooking up connection on peer: 1254e230 found <private>
default18:29:56.056519 +0200apsdLooking up connection on peer: 1254e330 found <private>
default18:29:56.057176 +0200apsdLooking up connection on peer: 125458d0 found <private>
default18:29:56.057393 +0200apsdLooking up connection on peer: 125458d0 found <private>
default18:29:56.150124 +0200apsdLooking up connection on peer: 1246d330 found <private>
default18:29:56.169029 +0200apsdTCP Conn 0x7fb4f87f7f20 event 1. err: 0
default18:29:56.169666 +0200apsdTCP Conn 0x7fb4f87f7f20 complete. fd: 6, err: 0
default18:29:56.171378 +0200apsd<private>: Keep alive proxying is not supported on any interface
default18:29:56.171635 +0200apsdTCP Conn 0x7fb4f87f7f20 starting SSL negotiation
default18:29:56.205150 +0200apsdLooking up connection on peer: 1246d330 found <private>
default18:29:56.206682 +0200apsdLooking up connection on peer: 12480c00 found <private>
default18:29:56.207439 +0200apsdLooking up connection on peer: 12480c00 found <private>
default18:29:56.212664 +0200apsdLooking up connection on peer: fe6bd50 found <private>
default18:29:56.212959 +0200apsdLooking up connection on peer: fe6bd50 found <private>
default18:29:56.225852 +0200apsdTCP Conn 0x7fb4f87f7f20 SSL Handshake DONE
default18:29:56.225947 +0200apsdcould not disable pinning: not an internal release
default18:29:56.245433 +0200apsd<private>: Connected to courier <private> (<private>) stream: <private> usingPackedFormat YES secureHandshakeEnabled YES
default18:29:56.245515 +0200apsd<private>: Status for user 0 darkWakeEnabled is disconnected, but user will be connected
default18:29:56.245563 +0200apsd<private>: Changing status for user 0 darkWakeEnabled from disconnected to connecting
default18:29:56.245601 +0200apsd<private>: Sending connect message for user 0 darkWakeEnabled with token '<private>'
default18:29:56.246104 +0200apsd<private>: Will connect user <private> because in full wake
default18:29:56.246162 +0200apsd<private>: Status for user <private> is disconnected, but user will be connected
default18:29:56.246199 +0200apsd<private>: Will connect user 0 because in full wake
default18:29:56.246244 +0200apsd<private>: Status for user 0 is disconnected, but user will be connected
default18:29:56.246280 +0200apsd<private>: Will connect user <private> because in full wake
default18:29:56.246326 +0200apsd<private>: Status for user <private> is disconnected, but user will be connected
default18:29:56.247731 +0200apsdLooking up connection on peer: 1247a5f0 found <private>
default18:29:56.247849 +0200apsdLooking up connection on peer: 1247a5f0 found <private>
default18:29:56.248415 +0200apsdLooking up connection on peer: 124738f0 found <private>
default18:29:56.248528 +0200apsdLooking up connection on peer: 124738f0 found <private>
default18:29:56.249145 +0200apsdLooking up connection on peer: 1254e4c0 found <private>
default18:29:56.249255 +0200apsdLooking up connection on peer: 1254e4c0 found <private>
default18:29:56.249816 +0200apsdLooking up connection on peer: 12543130 found <private>
default18:29:56.249925 +0200apsdLooking up connection on peer: 12543130 found <private>
default18:29:56.250467 +0200apsdLooking up connection on peer: 1247cca0 found <private>
default18:29:56.250575 +0200apsdLooking up connection on peer: 1247cca0 found <private>
default18:29:56.251216 +0200apsdLooking up connection on peer: 12475010 found <private>
default18:29:56.251324 +0200apsdLooking up connection on peer: 12475010 found <private>
default18:29:56.251863 +0200apsdLooking up connection on peer: 1252bce0 found <private>
default18:29:56.251971 +0200apsdLooking up connection on peer: 1252bce0 found <private>
default18:29:56.252515 +0200apsdLooking up connection on peer: 1252a310 found <private>
default18:29:56.252623 +0200apsdLooking up connection on peer: 1252a310 found <private>
default18:29:56.253163 +0200apsdLooking up connection on peer: 1254d960 found <private>
default18:29:56.253271 +0200apsdLooking up connection on peer: 1254d960 found <private>
default18:29:56.266656 +0200apsd<private>: Outstanding data received: <private> (length 24)
default18:29:56.266747 +0200apsd<private>: Stream processing: complete yes, invalid no, length parsed 24, parameters <private>
default18:29:56.267063 +0200apsd<private>: Handling connected message for user 0 darkWakeEnabled
default18:29:56.267092 +0200apsdReceived connect message [production]
default18:29:56.267122 +0200apsd<private>: Received connected response OK
default18:29:56.267153 +0200apsd<private>: Connected user 0 darkWakeEnabled to environment production
default18:29:56.267185 +0200apsd<private>: Received message size 5120
default18:29:56.267219 +0200apsd<private>: Received large message size 15360
default18:29:56.267271 +0200apsd<private>: Changing status for user 0 darkWakeEnabled from connecting to connected
default18:29:56.267375 +0200apsd<private>: Sending keep alive message via tcpStream: <private>
default18:29:56.267785 +0200apsd<private> informed of reconnect.
default18:29:56.267849 +0200apsd<private>: Sending active interval message with send all messages 'YES'
default18:29:56.267991 +0200apsd<private> setting isConnectedToService YES
default18:29:56.268028 +0200apsd<private> asked to change isConnected=NO to YES
default18:29:56.268101 +0200apsd<private> _processStoredIncomingMessages: enabled = YES
default18:29:56.268224 +0200apsd<private> processing 0 stored incoming messages
default18:29:56.268278 +0200apsd<private> done with _processStoredIncomingMessages
default18:29:56.268326 +0200apsd<private> _processStoredOutgoingMessages - marking outgoing messages as unsent so they can be processed (we terminated before they were acknowledged).
default18:29:56.268383 +0200apsd<private> received courierConnectionStatusDidChange from <private>. isConnected? YES
default18:29:56.268513 +0200apsdAPSMessageStore - APSIncomingMessageRecordDeleteMessagesOlderThanDate environment production 1 timeThreshold 554142596
default18:29:56.268863 +0200apsd<private>: Set active push connection state to YES
default18:29:56.268937 +0200apsd<private> asked to performFilterBlock
default18:29:56.269214 +0200apsd<private>: When filter is sent for user 0 darkWakeEnabled, users potentially with messages = 1
default18:29:56.269266 +0200apsd<private>: Sending filter message for user 0 darkWakeEnabled with token <private> with enabled topics = <private>, opportunistic topics = <private>, paused topics = <private>, ignored topics = <private>
default18:29:56.269411 +0200apsd<private> _processStoredIncomingMessages: enabled = YES
default18:29:56.269509 +0200apsd<private> processing 0 stored incoming messages
default18:29:56.269555 +0200apsd<private> done with _processStoredIncomingMessages
default18:29:56.269587 +0200apsd<private> _processStoredOutgoingMessages - marking outgoing messages as unsent so they can be processed (we terminated before they were acknowledged).
default18:29:56.269621 +0200apsdAPSMessageStore - APSIncomingMessageRecordDeleteMessagesOlderThanDate environment production 1 timeThreshold 554142596
default18:29:56.269678 +0200apsd<private>: Checking whether any users can be connected or disconnected
default18:29:56.269940 +0200apsd<private>: Not connecting 0 darkWakeEnabled because user is already connected
default18:29:56.270257 +0200apsd<private>: Changing status for user <private> from disconnected to connecting
default18:29:56.270364 +0200apsd<private>: Sending connect message for user <private> with token '<private>'
default18:29:56.272627 +0200apsd<private>: Stream processing: complete no, invalid no, length parsed 0, parameters (null)
default18:29:56.272728 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.287316 +0200apsd<private>: Outstanding data received: <private> (length 2)
default18:29:56.287379 +0200apsd<private>: Stream processing: complete yes, invalid no, length parsed 2, parameters <private>
default18:29:56.287423 +0200apsd<private>: Received successful keep-alive response <private>
default18:29:56.287610 +0200apsd<private>: Stream processing: complete no, invalid no, length parsed 0, parameters (null)
default18:29:56.288632 +0200apsdLooking up connection on peer: 1246d330 found <private>
default18:29:56.290477 +0200apsd<private>: Outstanding data received: <private> (length 24)
default18:29:56.290568 +0200apsd<private>: Stream processing: complete yes, invalid no, length parsed 24, parameters <private>
default18:29:56.291069 +0200apsd<private>: Handling connected message for user <private>
default18:29:56.291111 +0200apsdReceived connect message [production]
default18:29:56.291154 +0200apsd<private>: Received connected response OK
default18:29:56.291203 +0200apsd<private>: Connected user <private> to environment production
default18:29:56.291246 +0200apsd<private>: Received message size 5120
default18:29:56.291283 +0200apsd<private>: Received large message size 15360
default18:29:56.291336 +0200apsd<private>: Changing status for user <private> from connecting to connected
default18:29:56.291429 +0200apsd<private> received courierConnectionStatusDidChange from <private>. isConnected? YES
default18:29:56.291713 +0200apsd<private>: Set active push connection state to YES
default18:29:56.291809 +0200apsd<private> asked to performFilterBlock
default18:29:56.291985 +0200apsd<private>: When filter is sent for user <private>, users potentially with messages = 2
default18:29:56.292043 +0200apsd<private>: Sending filter message for user <private> with token <private> with enabled topics = <private>, opportunistic topics = <private>, paused topics = <private>, ignored topics = <private>
default18:29:56.292148 +0200apsd<private> _processStoredIncomingMessages: enabled = YES
default18:29:56.292264 +0200apsd<private> processing 0 stored incoming messages
default18:29:56.292351 +0200apsd<private> done with _processStoredIncomingMessages
default18:29:56.292384 +0200apsd<private> _processStoredOutgoingMessages - marking outgoing messages as unsent so they can be processed (we terminated before they were acknowledged).
default18:29:56.292419 +0200apsd<private>: Checking whether any users can be connected or disconnected
default18:29:56.292453 +0200apsd<private>: Not connecting 0 darkWakeEnabled because user is already connected
default18:29:56.292485 +0200apsd<private>: Not connecting <private> because user is already connected
default18:29:56.292534 +0200apsd<private>: Changing status for user 0 from disconnected to connecting
default18:29:56.292571 +0200apsd<private>: Sending connect message for user 0 with token '<private>'
default18:29:56.292764 +0200apsdAPSMessageStore - APSIncomingMessageRecordDeleteMessagesOlderThanDate environment production 1 timeThreshold 554142596
default18:29:56.293038 +0200apsd<private>: Stream processing: complete no, invalid no, length parsed 0, parameters (null)
default18:29:56.293084 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.293138 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.293185 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.293760 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.294374 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.294610 +0200apsdDispatching low priority message: <xpc object>
default18:29:56.294975 +0200apsdLooking up connection on peer: 1252ac00 found <private>
default18:29:56.295058 +0200apsdLooking up connection on peer: 1251fb80 found <private>
default18:29:56.295109 +0200apsdLooking up connection on peer: 1254e230 found <private>
default18:29:56.295153 +0200apsdLooking up connection on peer: 1254e330 found <private>
default18:29:56.312597 +0200apsd<private>: Outstanding data received: <private> (length 24)
default18:29:56.313831 +0200apsd<private>: Stream processing: complete yes, invalid no, length parsed 24, parameters <private>
default18:29:56.314058 +0200apsd<private>: Handling connected message for user 0
default18:29:56.314088 +0200apsdReceived connect message [production]
default18:29:56.314118 +0200apsd<private>: Received connected response OK
default18:29:56.314149 +0200apsd<private>: Connected user 0 to environment production
default18:29:56.314182 +0200apsd<private>: Received message size 5120
default18:29:56.314238 +0200apsd<private>: Received large message size 15360
default18:29:56.314357 +0200apsd<private>: Changing status for user 0 from connecting to connected
default18:29:56.314461 +0200apsd<private> received courierConnectionStatusDidChange from <private>. isConnected? YES
default18:29:56.314687 +0200apsd<private>: Set active push connection state to YES
default18:29:56.314819 +0200apsd<private> asked to performFilterBlock
default18:29:56.315173 +0200apsd<private>: When filter is sent for user 0, users potentially with messages = 3
default18:29:56.315288 +0200apsd<private>: Sending filter message for user 0 with token <private> with enabled topics = <private>, opportunistic topics = <private>, paused topics = <private>, ignored topics = <private>
default18:29:56.315526 +0200apsd<private> _processStoredIncomingMessages: enabled = YES
default18:29:56.315802 +0200apsd<private> processing 0 stored incoming messages
default18:29:56.315978 +0200apsd<private> done with _processStoredIncomingMessages


How can I investigate? What should I do to solve this issue?


Thanks in advance,


I'd really appreciate your help.

Mac Pro, macOS High Sierra (10.13.6)

Posted on Aug 23, 2018 9:33 AM

Reply

Similar questions

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

APSD is using a lot of memory on MacOS High Sierra (Virtual Machine)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.