The number of connections to TiDB remains consistent, with only a dozen or so connections

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb 的连接数一致都上来,仅有十几个连接

| username: RenHC

【TiDB Usage Environment】Production Environment
【TiDB Version】V6.5.0
【Reproduction Path】
【Encountered Problem: Problem Phenomenon and Impact】
【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page

| username: RenHC | Original post link

It can read and write normally, but after load balancing the business connections, it becomes very slow, and the number of connections doesn’t increase, with only a few connections. It’s even worse than directly connecting to a single IP! A single IP has more than a dozen connections.

| username: zhh_912 | Original post link

This should be related to the concurrency of the business. Keep observing.

| username: yytest | Original post link

Related to concurrency

| username: 随缘天空 | Original post link

What is the concurrency level?

| username: DBAER | Original post link

The concurrency of the test code is not high, right?

| username: 不想干活 | Original post link

It feels like a development issue.

| username: 小于同学 | Original post link

Concurrency related.

| username: TiDBer_rvITcue9 | Original post link

Ask the developers.

| username: zhaokede | Original post link

It depends on the business code situation. If the concurrency is low, the connections will also be few.

| username: 有猫万事足 | Original post link

It would be best to include a monitoring graph of the connection count.

| username: 友利奈绪 | Original post link

Look at concurrent execution.

| username: RenHC | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: RenHC | Original post link

The number of connections at midnight was high because I used sysbench to stress test it.

| username: RenHC | Original post link

The latest connection pool configuration, the number of connections has not been increasing.

| username: Hacker007 | Original post link

Test to see if it’s a code issue or a database configuration issue.

| username: RenHC | Original post link

I used sysbench for stress testing, and there was no problem creating connection threads for the database. How do I test the code?

| username: zhaokede | Original post link

Write test methods to test it, look it up online.

| username: RenHC | Original post link

Okay, thank you. I will contact the development team.

| username: 啦啦啦啦啦 | Original post link

Are there any limitations at the load balancing level, such as haproxy’s maxconn?