tricorder-observability / Starship

Starship: next-generation Observability platform built with eBPF+WASM
GNU Affero General Public License v3.0
164 stars 24 forks source link

Slow query to SQLite #61

Closed nascentcore-eng closed 1 year ago

nascentcore-eng commented 1 year ago

Describe the bug Seeing repeating logs of warning

2023/02/20 09:55:23 src/api-server/dao/module.go:79 SLOW SQL >= 200ms
[202.173ms] [rows:0] SELECT * FROM `code` WHERE `code`.`status` = 1 ORDER BY create_time desc

See logs.txt for the actual logs content.

To Reproduce Just visit dev-cluster-yzhao with

aws eks update-kubeconfig --name dev-cluster-yzhao --region ap-southeast-1

Expected behavior Should not see such slow query in the log

Screenshots

image

Additional context Logs file is attached

nascentcore-eng commented 1 year ago

[Uploading logs.txt…]()

nascentcore-eng commented 1 year ago

We have fixed this by conditionally wait on actions in API Server, and stop busy-polling SQLite DB.