change heap size
This commit is contained in:
parent
c12a0b236e
commit
109e98d80c
|
@ -25,7 +25,7 @@ start_link() ->
|
||||||
%% Description: Initiates the server
|
%% Description: Initiates the server
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
init([]) ->
|
init([]) ->
|
||||||
erlang:system_monitor(self(), [{long_gc, 5000}, {large_heap, 10000}, busy_port]),
|
erlang:system_monitor(self(), [{long_gc, 5000}, {large_heap, 1000000}, busy_port]),
|
||||||
?INFO("monitor is started...[ok]", []),
|
?INFO("monitor is started...[ok]", []),
|
||||||
{ok, #state{}}.
|
{ok, #state{}}.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
@ -61,10 +61,8 @@ handle_info({monitor, GcPid, long_gc, Info}, State) ->
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|
||||||
handle_info({monitor, GcPid, large_heap, Info}, State) ->
|
handle_info({monitor, GcPid, large_heap, Info}, State) ->
|
||||||
[{messages,Mess}] = process_info(GcPid, [messages]),
|
?ERROR("large_heap: gcpid = ~p,~p ~n ~p", [GcPid, process_info(GcPid,
|
||||||
?ERROR("large_heap: gcpid = ~p,~p ~n ~p, ~p", [GcPid, process_info(GcPid,
|
[registered_name, memory, message_queue_len,heap_size,total_heap_size]), Info]),
|
||||||
[registered_name, memory, message_queue_len,heap_size,total_heap_size]),
|
|
||||||
lists:nth(1, Mess),Info]),
|
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
|
|
||||||
handle_info({monitor, SusPid, busy_port, Port}, State) ->
|
handle_info({monitor, SusPid, busy_port, Port}, State) ->
|
||||||
|
|
Loading…
Reference in New Issue