Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 92227fa

Browse files
gerhardmichaelklishin
authored andcommitted
Always run a full GC on rabbit_event
When a node has to process events generated by creating 100k connections, 100k channels & 50k queues, it was observed that this process would use up to 13GB of memory and never release it. Since we are running a full GC whenever GC runs, this will slow the process down by ~10%, but the memory usage is stable & all memory gets eventually released. On a busy system, this can amount to many GBs. Partner-in-crime: @essen
1 parent 8504dc9 commit 92227fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rabbit_event.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
%%----------------------------------------------------------------------------
6666

6767
start_link() ->
68-
gen_event:start_link({local, ?MODULE}).
68+
gen_event:start_link({local, ?MODULE}, [{spawn_opt, [{fullsweep_after, 0}]}]).
6969

7070
%% The idea is, for each stat-emitting object:
7171
%%

0 commit comments

Comments
 (0)