Files
geedge-jira/md/OMPUB-1058.md
2025-09-14 21:52:36 +00:00

135 lines
3.7 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 【E21现场】TSG系统会话日志查询及导出超时报错
| ID | Creation Date | Assignee | Status |
|----|----------------|----------|--------|
| OMPUB-1058 | 2023-11-10T14:50:31.000+0800 | 戚岱杰 | 已关闭 |
---
No description
---
**qidaijie** commented on *2023-11-14T11:05:43.704+0800*:
查询超时的原因为Clickhouse节点IO较高无法在界面超时2分钟内完成数据查询。
 
现场情况:
* 升级2307版本后session原始日志量未有较大变动但分中心ETL程序优化汇聚到国家中心的日志量增加25%左右Clickhouse数据写入的量也随之增加。
* 针对session日志创建三张子表用于对高基数字段建立二级索引减少查询时直接加载数据的IO。以空间换取时间
** 子表的数据量与session日志相同表字段比其少三张子表存储总和是session日志的一半。
* ETL程序存在BUG未将标记为disable的字段移除该类字段任在持续写入且占用空间较大例如common_address_list。
 
综合以上情况通过以下方式减少Clickhouse节点使用的IO
# 关闭查询网关子表查询优化。
# 修复ETL程序BUG减少单条日志大小。
# 修改Gohangout入库批量大小。
## 避免所有节点在同一时刻写入数据。
## 减少Clickhouse数据块合并时间。
# 关闭session日志子表数据入库。
 
---
**qidaijie** commented on *2023-11-15T15:24:36.710+0800*:
目前已进行操作:
* 关闭查询网关子表查询优化。
** 修改后查询24小时日志详情展示正常其余任超时。
* 修复了分中心ETL程序未将标记为disable的字段移除的BUG减少单条日志的大小。
** 修复后session日志每台Clickhouse节点每天的存储量减少了1/10左右。
* 修改Gohangout 会话日志入库批量减少至10万入库线程数减少至1。
** 该操作可使数据入库操作更频繁,避免所有节点在同一时刻写入数据。
---
**heyong** commented on *2023-11-16T19:42:47.393+0800*:
目前TSG系统session日志
不加过滤条件进行24小时以上的会话日志查询出现日志详情正常显示导出功能正常但柱状图无法显示情况异常现象见图片 “24小时会话日志.png“
添加限制条件查询72小时会话日志志详情正常显示导出功能正常柱状图显示正常。
 
---
**qidaijie** commented on *2023-11-24T19:09:30.917+0800*:
现场Clickhouse session日志子表操作描述
* 2023.11.17 关闭子表session_record_http_domain数据写入。
* 2023.11.21 关闭子表session_record_server_domain数据写入。
* 2023.11.23 关闭子表session_record_common_server_ip数据写入。
* 2023.11.24 关闭子表session_record_common_client_ip数据写入。
 
综合以上操作,关闭以上四个子表同步数据视图后:
* IO使用率平均下降约20%左右。
* 单台服务器磁盘平均写入数据由100MB/s下降为50MB/s。
* 24小时日志明细查询由140s减少至70s左右较优化前提升近一倍查询性能。
 
目前TSG界面现状
# 最近24小时会话日志查询、导出均正常日志明细可导出72小时日志。
# 日志界面查询最近24/48小时均正常。
 
暂时关闭该bug后续持续追踪。
---
## Attachments
**47458/24小时会话日志.png**
---
**47294/clickhouse升级前后IO对比.png**
---
**47295/clickhouse升级前后数据写入对比.png**
---
**47303/会话日志量趋势.png**
---
**47149/微信图片_20231110094821.png**
---
**47148/微信图片_20231110094829.png**
---
**47147/微信图片_20231110094837.png**
---
**47146/微信图片_20231110094845.png**
---