forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Listener federators and memory improvements (2600hz#6298)
* Listener federators and memory improvements Prior, when a gen_listener needed to federate its queue and bindings to other zones, it would start_link the listener_federator (and trap exits). However, should a listener_federator process actually exit, the parent gen_listener would receive the EXIT message but failed to have a handle_info clause to restart the process. Introduce a sofo supervisor for starting listener_federator processes and restart them if they die unexpectedly (non-normal exits). Secondly, introduce memory consumption checks and GC gen_listeners when they exceed 100K in total_heap_size. In addition, copy the binary payloads as they arrive off the AMQP channel has shown to decelerate the memory growth as the original binary can be garbage collected sooner and not count against the gen_listener's "old" heap. All told, these manual GC runs appear to be minimal and only affect long-running and busy gen_listeners; even fewer runs needed to release memory after the binary:copy/1 introduction. * just ok * handle state transition so Payload can be throw out sooner * right state * fun police * monitor parent and terminate if parent dies
- Loading branch information
1 parent
3b0f623
commit dc29520
Showing
7 changed files
with
212 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.