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

The Connection Count panel in the Grafana dashboard is inaccurate. #54428

Closed
finalkira000 opened this issue Jul 4, 2024 · 5 comments · Fixed by #54546
Closed

The Connection Count panel in the Grafana dashboard is inaccurate. #54428

finalkira000 opened this issue Jul 4, 2024 · 5 comments · Fixed by #54546
Assignees
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. report/community The community has encountered this bug. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@finalkira000
Copy link

finalkira000 commented Jul 4, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

image

2. What did you expect to see? (Required)

Accurately reflect the number of connections.

3. What did you see instead (Required)

bug

4. What is your TiDB version? (Required)

7.5.1,7.5.2

@finalkira000 finalkira000 added the type/bug The issue is confirmed as a bug. label Jul 4, 2024
@jebter jebter added sig/sql-infra SIG: SQL Infra affects-7.5 This bug affects the 7.5.x(LTS) versions. severity/moderate labels Jul 5, 2024
@djshow832
Copy link
Contributor

djshow832 commented Jul 5, 2024

#51889 is already fixed in v7.5.2. If it still happens, it may be another bug.
Can you provide more information to reproduce it?

@mayjiang0203
Copy link

One CT hit a similar issue at https://asktug.com/t/topic/1028444.

@dbakit
Copy link

dbakit commented Jul 10, 2024

  • SQL 统计
image
  • prometheus 数据

image

对比下来,感觉是 default 这个 RESOURCE_GROUP 的数据有异常,最明显的是245结尾那个 tidb-server 节点,default 的总连接数竟然是个负数

@YangKeao YangKeao self-assigned this Jul 10, 2024
@YangKeao
Copy link
Member

YangKeao commented Jul 10, 2024

Oops, I may have found the issue: if the connection is closed before handshaking successfully, it will decrease the connection count. Because when the connection is closed, the connection count is always decreased (after the session has opened), but it'll increase only after successful handshake.

I'm not sure whether it's actually the issue you are facing now, but I'll try to fix it.

@seiya-annie
Copy link

/report community

@ti-chi-bot ti-chi-bot bot added the report/community The community has encountered this bug. label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. report/community The community has encountered this bug. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants