Skip to content

Commit

Permalink
Merge pull request #2796 from emqx/force-shutdown-on-dashboard
Browse files Browse the repository at this point in the history
update(dashboard): Add force shutdown
  • Loading branch information
Meggielqk authored Jan 17, 2025
2 parents 8c257bf + ad42118 commit 390428d
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 25 deletions.
4 changes: 2 additions & 2 deletions en_US/configuration/flapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Where, <!--did not add the dashboard UI as it seems that most configurations lis

::: tip

You can also customize the settings via Dashboard by clicking **Access Control** -> **Flapping Detect** on the left navigation menu of the Dashboard. Once you configured these items with Dashboard, your settings will override the same configuration items in `emqx.conf`.
You can also customize the settings via the Dashboard by clicking **Access Control** -> **Flapping Detect** on the left navigation menu. Once you have configured these items with Dashboard, your settings will override the same configuration items in `emqx.conf`.

:::

::: tip

EMQX offers more configuration items to serve customized needs better. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
EMQX offers more configuration items to better serve customized needs. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).

:::
4 changes: 2 additions & 2 deletions en_US/configuration/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ After execution, you can run `emqx ctl license info` to confirm that the new lic

::: tip

You can also configure the license file through the EMQX Dashboard. For how to configure the license via Dashboard, see [Work with License](../deploy/license.md). Once you configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.
You can also configure the license file through the EMQX Dashboard. For how to configure the license via Dashboard, see [Work with License](../deploy/license.md). Once you have configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.

:::

::: tip

EMQX offers more configuration items to serve customized needs better. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
EMQX offers more configuration items to better serve customized needs. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).

:::
2 changes: 1 addition & 1 deletion en_US/configuration/limiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ listeners.tcp.default {

::: tip

EMQX offers more configuration items to serve customized needs better. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
EMQX offers more configuration items to better serve customized needs. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).

:::
10 changes: 5 additions & 5 deletions en_US/configuration/listener.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ In EMQX, listener is configured to receive requests from MQTT clients. EMQX supp
- Websocket listener: `8083`
- Secure websocket listener: `8084`

:::tip
::: tip

You can also configure listeners via Dashboard by clicking **Management** -> **Listener** on the left navigation menu of the Dashboard.
However if the listeners are configured from `emqx.conf`, the changes made from the dashboard will only take effect temporarily until EMQX restart.
You can also configure listeners via Dashboard by clicking **Management** -> **Listeners** on the left navigation menu of the Dashboard.
However if the listeners are configured from `emqx.conf`, the changes made from the Dashboard will only take effect temporarily until EMQX restarts.

:::

::: tip

EMQX offers more configuration items to serve customized needs better. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
EMQX offers more configuration items to better serve customized needs. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).

:::

Expand Down Expand Up @@ -138,7 +138,7 @@ where:

<!--To add code sample for adding multiple listeners.-->

## Link Listener to a Configuration zone
## Link Listener to a Configuration Zone

Each listener in EMQX is associated with a zone, which by default is set to a logical zone named `default`.

Expand Down
2 changes: 1 addition & 1 deletion en_US/configuration/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ Where,
::: tip
EMQX offers more configuration items to serve customized needs better. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
EMQX offers more configuration items to better serve customized needs. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
:::
20 changes: 10 additions & 10 deletions en_US/configuration/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This section will introduce the configuration settings that determine how the MQ

:::tip

You can also find the corresponding configuration items in EMQX Dashboard (**Management** -> **MQTT Settings** -> **General**). Once you configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.
You can also find the corresponding configuration items in the EMQX Dashboard (**Management** -> **MQTT Settings** -> **General**). Once you have configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.

:::

Expand Down Expand Up @@ -40,13 +40,13 @@ Where,

## Subscription Settings

In EMQX, subscription refers to the process of a client subscribing to a topic on EMQX. When a client subscribes to a topic, it is indicating that it wants to receive messages published to that topic.
In EMQX, subscription refers to the process of a client subscribing to a topic on EMQX. When a client subscribes to a topic, it indicates that it wants to receive messages published to that topic.

This section introduces how to configure shared subscription, wildcard subscription, and exclusive subscription.
This section introduces how to configure shared, wildcard, and exclusive subscriptions.

:::tip

You can also find the corresponding configuration items in EMQX Dashboard (**Configuration** -> **MQTT** -> **General**). Once you configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.
You can also find the corresponding configuration items in the EMQX Dashboard (**Management** -> **MQTT Settings** -> **General**). Once you have configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.

:::

Expand All @@ -63,7 +63,7 @@ mqtt {

Where,

| **Configuration Items** | Dashboard UI | **Description** | **Default value** | Optinal Values |
| **Configuration Items** | Dashboard UI | **Description** | **Default value** | Optional Values |
| ------------------------------ | ------------------------------- | ------------------------------------------------------------ | ----------------- | ------------------------------------------------------------ |
| `wildcard_subscription` | Wildcard Subscription Available | Wildcard subscriptions allow MQTT clients to subscribe to multiple topics using a single subscription, using wildcards such as `+` and `#`. <br /><br />This sets whether to enable wildcard subscription. | `true` | `true`, `false` |
| `exclusive_subscription` | Exclusive Subscription | Exclusive subscriptions allow only one MQTT client to subscribe to a topic at a time.<br /><br />This sets whether to enable exclusive subscriptions. | `true` | `true`, `false` |
Expand Down Expand Up @@ -154,21 +154,21 @@ Where,
| `mqueue_priorities` | Topic Priorities | This sets the topic priorities, the configuration here will override that defined in `mqueue_default_priority`. | `disabled` <br />The session uses the priority set by `mqueue_default_priority`. | `disabled`<br />or<br />`1` - `255` |
| `mqueue_default_priority` | Default Topic Priorities | This sets the default topic priority. | `lowest` | `highest``lowest` |
| `mqueue_store_qos0` | Store QoS 0 Message | This sets whether to store QoS 0 message in the message queue when the connection is down but the session remains. | `true` | `true`, `false` |
| `force_shutdown` | -- | This sets whether to enable the force shutdown feature if the queue length (`max_message_queue_le`) or heap size (`max_heap_size`) reaches the specified value. | `true` | `true`, `false` |
| `force_shutdown.max_message_queue_le` | -- | This sets the maximum queue length to trigger a forced shutdown. | `1000` | `1` - `infinity` |
| `force_shutdown.max_heap_size` | -- | This sets the maximum heap size to trigger a forced shutdown. | `32MB` | -- |
| `force_shutdown` | Enable Force Shutdown | This sets whether to enable the force shutdown feature if the queue length (`max_message_queue_le`) or heap size (`max_heap_size`) reaches the specified value. | `true` | `true`, `false` |
| `force_shutdown.max_message_queue_le` | Max Mailbox Size | This sets the maximum queue length to trigger a forced shutdown. | `1000` | `1` - `infinity` |
| `force_shutdown.max_heap_size` | Max Heap Size | This sets the maximum heap size to trigger a forced shutdown. | `32MB` | -- |
| `force_gc` | -- | This sets whether to enable forced garbage collection if the specified message number (`count`) or byte received (`bytes`) is reached: | `true` | `true`, `false` |
| `force_gc.count` | -- | This sets the received message number that will trigger the forced garbage collection. | `16000` | `0` - `infinity` |
| `force_gc.bytes` | -- | This sets the received byte number that will trigger the forced garbage collection. | `16MB`<br />Unit: `MB` | -- |

:::tip

To Configure MQTT via Dashboard, click **Configuration** -> **MQTT** on the left navigation menu of the Dashboard. Once you configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.
To Configure MQTT settings via Dashboard, click **Management** -> **MQTT Settings** on the left navigation menu of the Dashboard. Once you have configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.

:::

::: tip

EMQX offers more configuration items to serve customized needs better. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
EMQX offers more configuration items to better serve customized needs. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).

:::
10 changes: 10 additions & 0 deletions en_US/dashboard/cluster_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ The **Retainer** tab page contains MQTT protocol-related configuration items for

The **System Topic** tab page provides configuration items for EMQX's built-in system topics. EMQX periodically publishes operational status, usage statistics, and real-time client events to system topics prefixed with `$SYS/`. When clients subscribe to these topics, EMQX will publish related information to those topics. Configuration items for system topics include message publish interval, heartbeat interval, etc.

### Force Shutdown

The **Force Shutdown** tab allows you to configure the automatic shutdown behavior based on resource usage thresholds. This feature safeguards the EMQX from potential instability due to excessive resource consumption, such as message queue length or heap size.

You can configure settings for the following fields in the **Force Shutdown** tab page:

- **Enable Force Shutdown**: This toggle switch enables or disables the force shutdown feature. When enabled, the system will automatically trigger a shutdown if the specified resource thresholds are surpassed. It is enabled by default.
- **Max Heap Size**: Specifies the maximum allowed heap size for the system. If the heap size surpasses this limit, the system will initiate a forced shutdown to maintain stability. The default value is `32 MB`.
- **Max Message Queue Length**: Defines the maximum allowed length for the message queue. If the queue exceeds this length, a forced shutdown will be triggered to prevent system overload. The default value is `1000`.

## Listeners

Click on **Management** -> **Listeners** in the left menu to enter the listeners page. This page displays a list of listeners by default. EMQX provides four common listeners:
Expand Down
8 changes: 4 additions & 4 deletions zh_CN/configuration/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ $$

::: tip

您也可以在 EMQX Dashboard 中找到对应的配置项(**管理** -> **MQTT 配置** -> **会话****会话持久化**)。一旦您通过 Dashboard 配置了这些项,您的设置将覆盖 `emqx.conf` 中的相同配置项。
您也可以在 EMQX Dashboard 中找到对应的配置项(**管理** -> **MQTT 配置**)。一旦您通过 Dashboard 配置了这些项,您的设置将覆盖 `emqx.conf` 中的相同配置项。

:::

Expand Down Expand Up @@ -157,9 +157,9 @@ session {
| `mqueue_priorities` | 主题优先级 | 此设置主题优先级,此处的配置将覆盖 `mqueue_default_priority` 定义的优先级。 | `disabled` <br />会话使用 `mqueue_default_priority` 设置的优先级。 | `disabled`<br />或<br />`1` - `255` |
| `mqueue_default_priority` | 默认主题优先级 | 此设置默认主题优先级。 | `lowest` | `highest``lowest` |
| `mqueue_store_qos0` | 存储 QoS 0 消息 | 此设置在连接断开但会话保持时是否存储 QoS 0 消息在消息队列中。 | `true` | `true`, `false` |
| `force_shutdown` | -- | 此设置是否启用强制关闭功能,如果队列长度(`max_message_queue_le`)或堆大小(`max_heap_size`)达到指定值。 | `true` | `true`, `false` |
| `force_shutdown.max_message_queue_le` | -- | 此设置触发强制关闭的最大队列长度。 | `1000` | `1` - `infinity` |
| `force_shutdown.max_heap_size` | -- | 此设置触发强制关闭的最大堆大小。 | `32 MB` | -- |
| `force_shutdown` | 强制关闭 | 此设置是否启用强制关闭功能,如果队列长度(`max_message_queue_le`)或堆大小(`max_heap_size`)达到指定值。 | `true` | `true`, `false` |
| `force_shutdown.max_message_queue_le` | 最大邮箱大小 | 此设置触发强制关闭的最大队列长度。 | `1000` | `1` - `infinity` |
| `force_shutdown.max_heap_size` | 最大堆内存 | 此设置触发强制关闭的最大堆大小。 | `32 MB` | -- |
| `force_gc` | -- | 此设置是否启用强制垃圾回收,如果达到指定的消息数量(`count`)或接收字节(`bytes`): | `true` | `true`, `false` |
| `force_gc.count` | -- | 此设置将触发强制垃圾回收的接收消息数量。 | `16000` | `0` - `infinity` |
| `force_gc.bytes` | -- | 此设置将触发强制垃圾回收的接收字节数量。 | `16 MB`<br />单位: `MB` | -- |
Expand Down
10 changes: 10 additions & 0 deletions zh_CN/dashboard/cluster_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ EMQX 提供了热配置能力,可以在运行时动态修改配置,无需重

系统主题菜单下为 EMQX 内置的系统主题相关配置项,EMQX 将周期性的将运行状态,使用统计和即时客户端事件发布到 `$SYS/` 开头的系统主题,当客户端订阅该主题时,EMQX 将会将相关的信息发布到该主题下。系统主题的配置项包括消息发布周期,心跳周期等相关配置。

### 强制关闭

**强制关闭**选项卡允许您根据资源使用阈值配置自动关闭行为。此功能可以防止由于过度消耗资源(例如消息队列长度或堆内存大小)而导致系统不稳定。

**强制关闭**选项卡页面中,您可以配置以下字段的设置:

- **启用强制关闭**:此开关用于启用或禁用强制关闭功能。当启用时,如果超过指定的资源阈值,系统将自动触发关闭。默认为`启用`
- **最大堆内存**:指定系统允许的最大堆内存大小。如果堆内存超出此限制,系统将启动强制关闭,以保持稳定性。默认为`32 MB`
- **最大邮箱大小**:定义消息队列的最大允许长度。如果队列长度超过此限制,系统将触发强制关闭以防止系统过载。默认为`1000`

## 监听器

点击左侧菜单中的**管理** -> **监听器**进入监听器页面。该页面默认是一个监听器的列表页。EMQX 默认提供了四个常用的监听器:
Expand Down

0 comments on commit 390428d

Please sign in to comment.