Kaynağa Gözat

fix: increase emqx_router_sup restart intensity

The goal is to tolerate occasional crashes that can happen under relatively normal conditions
and don't seem critical to shutdown the whole app (emqx).
For example, mria write/delete call delegated from a replicant to a core node may fail,
if the core node is being stopped / restarted / not ready.

Fixes: EMQX-10703, #11310
Serge Tupchii 2 yıl önce
ebeveyn
işleme
f276ea9e91

+ 1 - 1
apps/emqx/src/emqx.app.src

@@ -2,7 +2,7 @@
 {application, emqx, [
     {id, "emqx"},
     {description, "EMQX Core"},
-    {vsn, "5.1.4"},
+    {vsn, "5.1.5"},
     {modules, []},
     {registered, []},
     {applications, [

+ 6 - 1
apps/emqx/src/emqx_router_sup.erl

@@ -41,4 +41,9 @@ init([]) ->
         hash,
         {emqx_router, start_link, []}
     ]),
-    {ok, {{one_for_all, 0, 1}, [Helper, RouterPool]}}.
+    SupFlags = #{
+        strategy => one_for_one,
+        intensity => 10,
+        period => 100
+    },
+    {ok, {SupFlags, [Helper, RouterPool]}}.

+ 6 - 0
changes/ce/fix-11388.en.md

@@ -0,0 +1,6 @@
+Increase `emqx_router_sup` restart intensity.
+
+The goal is to tolerate occasional crashes that can happen under relatively normal conditions
+and don't seem critical to shutdown the whole app (emqx).
+For example, mria write/delete call delegated from a replicant to a core node by `emqx_router_helper` may fail,
+if the core node is being stopped / restarted / not ready.