Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add faq of start-limit-hit when restart taosd by systemctl #29755

Merged
merged 8 commits into from
Feb 12, 2025
2 changes: 1 addition & 1 deletion docs/zh/14-reference/03-taos-sql/02-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ SHOW db_name.ALIVE;

查询数据库 db_name 的可用状态,返回值 0:不可用 1:完全可用 2:部分可用(即数据库包含的 VNODE 部分节点可用,部分节点不可用)

## 查看DB 的磁盘空间占用
## 查看 DB 的磁盘空间占用

```sql
select * from INFORMATION_SCHEMA.INS_DISK_USAGE where db_name = 'db_name'
Expand Down
16 changes: 14 additions & 2 deletions docs/zh/27-train-faq/01-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,17 @@ TDinsight插件中展示的数据是通过taosKeeper和taosAdapter服务收集
### 34 超级表带 TAG 过滤查子查数据与直接查子表哪个块?
直接查子表更快。超级表带 TAG 过滤查询子查数据是为满足查询方便性,同时可对多个子表中数据进行过滤,如果目的是追求性能并已明确查询子表,直接从子表查性能更高

### 35 如何查看数据压缩率指标?
TDengine 目前只提供以表为统计单位的压缩率,数据库及整体还未提供,查看命令是在客户端 taos-CLI 中执行 `SHOW TABLE DISTRIBUTED table_name;` 命令,table_name 为要查看压缩率的表,可以为超级表、普通表及子表,详细可 [查看此处](https://docs.taosdata.com/reference/taos-sql/show/#show-table-distributed)
### 35 如何查看数据库的数据压缩率和磁盘占用指标?
TDengine 3.3.5.0 之前的版本,只提供以表为统计单位的压缩率,数据库及整体还未提供,查看命令是在客户端 taos-CLI 中执行 `SHOW TABLE DISTRIBUTED table_name;` 命令,table_name 为要查看压缩率的表,可以为超级表、普通表及子表,详细可 [查看此处](https://docs.taosdata.com/reference/taos-sql/show/#show-table-distributed)

TDengine 3.3.5.0 及以上的版本,还提供了数据库整体压缩率和磁盘空间占用统计。查看数据库整体的数据压缩率和磁盘空间占用的命令为 `SHOW db_name.disk_info;`,查看数据库各个模块的磁盘空间占用的命令为 `SELECT * FROM INFORMATION_SCHEMA.INS_DISK_USAGE WHERE db_name='db_name';`,db_name 为要查看的数据库名称。详细可 [查看此处](https://docs.taosdata.com/reference/taos-sql/database/#%E6%9F%A5%E7%9C%8B-db-%E7%9A%84%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%E5%8D%A0%E7%94%A8)

### 36 短时间内,通过 systemd 重启 taosd 超过一定次数后重启失败,报错:start-limit-hit。
问题描述:
TDengine 3.3.5.1 及以上的版本,taosd.service 的 systemd 配置文件中,StartLimitInterval 参数从 60 秒调整为 900 秒。若在 900 秒内 taosd 服务重启达到 3 次,后续通过 systemd 启动 taosd 服务时会失败,执行 `systemctl status taosd.service` 显示错误:Failed with result 'start-limit-hit'。

问题原因:
TDengine 3.3.5.1 之前的版本,StartLimitInterval 为 60 秒。若在 60 秒内无法完成 3 次重启(例如,因从 WAL(预写式日志)中恢复大量数据导致启动时间较长),则下一个 60 秒周期内的重启会重新计数,导致系统持续不断地重启 taosd 服务。为避免无限重启问题,将 StartLimitInterval 由 60 秒调整为 900 秒。因此,在使用 systemd 短时间内多次启动 taosd 时遇到 start-limit-hit 错误的机率增多。

问题解决:
1)通过 systemd 重启 taosd 服务:推荐方法是先执行命令 `systemctl reset-failed taosd.service` 重置失败计数器,然后再通过 `systemctl restart taosd.service` 重启;若需长期调整,可手动修改 /etc/systemd/system/taosd.service 文件,将 StartLimitInterval 调小或将 StartLimitBurst 调大(注:重新安装 taosd 会重置该参数,需要重新修改),执行 `systemctl daemon-reload` 重新加载配置,然后再重启。2)也可以不通过 systemd 而是通过 taosd 命令直接重启 taosd 服务,此时不受 StartLimitInterval 和 StartLimitBurst 参数限制。