test: check_oom's max_mailbox_size
This commit is contained in:
parent
eaa129d0d7
commit
04e62f6a2d
|
@ -238,7 +238,7 @@
|
||||||
-type stats() :: [{atom(), term()}].
|
-type stats() :: [{atom(), term()}].
|
||||||
|
|
||||||
-type oom_policy() :: #{
|
-type oom_policy() :: #{
|
||||||
max_message_queue_len => non_neg_integer(),
|
max_mailbox_size => non_neg_integer(),
|
||||||
max_heap_size => non_neg_integer(),
|
max_heap_size => non_neg_integer(),
|
||||||
enable => boolean()
|
enable => boolean()
|
||||||
}.
|
}.
|
||||||
|
|
|
@ -31,7 +31,7 @@ force_gc_conf() ->
|
||||||
#{bytes => 16777216, count => 16000, enable => true}.
|
#{bytes => 16777216, count => 16000, enable => true}.
|
||||||
|
|
||||||
force_shutdown_conf() ->
|
force_shutdown_conf() ->
|
||||||
#{enable => true, max_heap_size => 4194304, max_message_queue_len => 1000}.
|
#{enable => true, max_heap_size => 4194304, max_mailbox_size => 1000}.
|
||||||
|
|
||||||
rpc_conf() ->
|
rpc_conf() ->
|
||||||
#{
|
#{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
{application, emqx_gateway, [
|
{application, emqx_gateway, [
|
||||||
{description, "The Gateway management application"},
|
{description, "The Gateway management application"},
|
||||||
{vsn, "0.1.15"},
|
{vsn, "0.1.16"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{mod, {emqx_gateway_app, []}},
|
{mod, {emqx_gateway_app, []}},
|
||||||
{applications, [kernel, stdlib, emqx, emqx_authn, emqx_ctl]},
|
{applications, [kernel, stdlib, emqx, emqx_authn, emqx_ctl]},
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
-define(DEFAULT_GC_OPTS, #{count => 1000, bytes => 1024 * 1024}).
|
-define(DEFAULT_GC_OPTS, #{count => 1000, bytes => 1024 * 1024}).
|
||||||
-define(DEFAULT_OOM_POLICY, #{
|
-define(DEFAULT_OOM_POLICY, #{
|
||||||
max_heap_size => 4194304,
|
max_heap_size => 4194304,
|
||||||
max_message_queue_len => 32000
|
max_mailbox_size => 32000
|
||||||
}).
|
}).
|
||||||
|
|
||||||
-elvis([{elvis_style, god_modules, disable}]).
|
-elvis([{elvis_style, god_modules, disable}]).
|
||||||
|
|
|
@ -230,7 +230,7 @@ check_oom(Policy) ->
|
||||||
check_oom(_Pid, #{enable := false}) ->
|
check_oom(_Pid, #{enable := false}) ->
|
||||||
ok;
|
ok;
|
||||||
check_oom(Pid, #{
|
check_oom(Pid, #{
|
||||||
max_message_queue_len := MaxQLen,
|
max_mailbox_size := MaxQLen,
|
||||||
max_heap_size := MaxHeapSize
|
max_heap_size := MaxHeapSize
|
||||||
}) ->
|
}) ->
|
||||||
case process_info(Pid, [message_queue_len, total_heap_size]) of
|
case process_info(Pid, [message_queue_len, total_heap_size]) of
|
||||||
|
|
|
@ -140,7 +140,7 @@ t_index_of(_) ->
|
||||||
|
|
||||||
t_check(_) ->
|
t_check(_) ->
|
||||||
Policy = #{
|
Policy = #{
|
||||||
max_message_queue_len => 10,
|
max_mailbox_size => 10,
|
||||||
max_heap_size => 1024 * 1024 * 8,
|
max_heap_size => 1024 * 1024 * 8,
|
||||||
enable => true
|
enable => true
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue