Merge pull request #10124 from kjellwinblad/kjell/mongodb/default_heartbeat
fix: increase heartbeat time to avoid extreme MongoDB logging
This commit is contained in:
commit
87ede1b1f7
|
@ -177,8 +177,8 @@ The MongoDB default port 27017 is used if `[:Port]` is not specified."""
|
|||
|
||||
heartbeat_period {
|
||||
desc {
|
||||
en: "Controls when the driver checks the state of the MongoDB deployment. Specify the interval between checks, counted from the end of the previous check until the beginning of the next one."
|
||||
zh: "控制驱动程序何时检查MongoDB部署的状态。指定检查的间隔时间,从上一次检查结束到下一次检查开始计算。"
|
||||
en: "Controls when the driver checks the state of the MongoDB deployment. Specify the interval between checks, counted from the end of the previous check until the beginning of the next one. If the number of connections is increased (which will happen, for example, if you increase the pool size), you may need to increase this period as well to avoid creating too many log entries in the MongoDB log file."
|
||||
zh: "控制驱动程序何时检查MongoDB部署的状态。指定检查的间隔时间,从上一次检查结束到下一次检查开始计算。如果连接数增加(例如,如果你增加池子的大小,就会发生这种情况),你可能也需要增加这个周期,以避免在MongoDB日志文件中创建太多的日志条目。"
|
||||
}
|
||||
label {
|
||||
en: "Heartbeat period"
|
||||
|
|
|
@ -106,7 +106,7 @@ fields(topology) ->
|
|||
{socket_timeout_ms, duration("socket_timeout")},
|
||||
{server_selection_timeout_ms, duration("server_selection_timeout")},
|
||||
{wait_queue_timeout_ms, duration("wait_queue_timeout")},
|
||||
{heartbeat_frequency_ms, duration("heartbeat_period")},
|
||||
{heartbeat_frequency_ms, fun heartbeat_frequency_ms/1},
|
||||
{min_heartbeat_frequency_ms, duration("min_heartbeat_period")}
|
||||
].
|
||||
|
||||
|
@ -407,6 +407,12 @@ duration(Desc) ->
|
|||
desc => ?DESC(Desc)
|
||||
}.
|
||||
|
||||
heartbeat_frequency_ms(type) -> emqx_schema:duration_ms();
|
||||
heartbeat_frequency_ms(desc) -> ?DESC("heartbeat_period");
|
||||
heartbeat_frequency_ms(default) -> 200000;
|
||||
heartbeat_frequency_ms(validator) -> [?MIN(1)];
|
||||
heartbeat_frequency_ms(_) -> undefined.
|
||||
|
||||
max_overflow(type) -> non_neg_integer();
|
||||
max_overflow(desc) -> ?DESC("max_overflow");
|
||||
max_overflow(default) -> 0;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
The default heartbeat period for MongoDB has been increased to reduce the risk of too excessive logging to the MongoDB log file.
|
|
@ -0,0 +1 @@
|
|||
增加了MongoDB的默认心跳周期,以减少对MongoDB日志文件的过多记录的风险。
|
Loading…
Reference in New Issue