# When thread pool is full can't use admin port login

**URL:** <https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004>\
**Category:** Percona Server for MySQL 8.0\
**Tags:** mysql, percona\
**Created:** [June 13, 2024, 9:50am UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004 "2024-06-13T09:50:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chuang\_Pan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/chuang_pan/32/12158_2.png) [@Chuang\_Pan](https://forums.percona.com/u/Chuang_Pan)\
**Post date:** [June 13, 2024, 9:50am UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004/1 "2024-06-13T09:50:47Z")

</div>

first,we use pool-of-threads  
past we use percona server 5.7，when the thread pool is full(not reached max\_connection,just thread pool), we can use extra\_port login in and kill quetion connection.  
now we upgrade to percona server 8.0.33, when the thread pool is full, we can’t use admin port login in.  
ps: our max thread pool can use is 17,max\_connetions and max\_user\_connetion is 4000 and 3000. when the thread running reached 17,all other connecion is hung, at 5.7 we can login in use extra port, at 8.0.33 we can’t login in use admin port.  
I think it’s a BUG

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/5/5/55f6456bf0a8794e3e79c394b9428034fae37e11.png)

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [June 13, 2024, 1:35pm UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004/2 "2024-06-13T13:35:50Z")

</div>

Hi @Chuang_Pan,

Welcome to Percona community.  
It is interesting observation if true; so I tried this on PS8033 but couldn’t quiet see this.  
You have max\_connections and max\_user\_connections set to 4000/3000 respectively.  
Your thread-pool is set to 17. Threadpool specifies number of threads running concurrently and it has no role in limiting user connections really… I could connect !  
Can you provide steps to reproduce this please?  
Thanks,  
K

---

<div class="post-metadata">

**Author:** ![Chuang\_Pan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/chuang_pan/32/12158_2.png) [@Chuang\_Pan](https://forums.percona.com/u/Chuang_Pan)\
**Post date:** [June 14, 2024, 2:12am UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004/3 "2024-06-14T02:12:07Z")

</div>

Thanks for reply!  
To display, we set global thread\_pool\_size=1,as below  
±--------------------------------±----------------+  
| Variable\_name | Value |  
±--------------------------------±----------------+  
| thread\_pool\_oversubscribe | 3 |  
| thread\_pool\_size | 1 |  
| max\_connections | 4000 |  
| max\_user\_connections | 3000 |  
| admin\_address | 127.0.0.1 |  
| admin\_port | 23306 |  
| create\_admin\_listener\_thread | ON |

Now we have 5 running threads like this

@root@(none) \>select sleep(300);

We tried to login in use admin port, it’s hung.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/c/0/c09499d17523899acddb0fc7926a10795ea22e63.png)  
looking forward to your reply，thanks

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [June 14, 2024, 4:23am UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004/4 "2024-06-14T04:23:36Z")

</div>

@Chuang_Pan thanks for the case but I couldn’t reproduce that !

This is what I did:

```auto
[k@test ~]$ nohup mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock -e "select sleep(1000);" 2>/dev/null &
[1] 3455822
[k@test ~]$ nohup mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock -e "select sleep(1000);" 2>/dev/null &
[2] 3455823
[k@test ~]$ nohup mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock -e "select sleep(1000);" 2>/dev/null &
[3] 3455824
[k@test ~]$ nohup mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock -e "select sleep(1000);" 2>/dev/null &
[4] 3455825
[k@test ~]$ nohup mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock -e "select sleep(1000);" 2>/dev/null &
[5] 3455826
[k@test ~]$ nohup mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock -e "select sleep(1000);" 2>/dev/null &
[6] 3455827
[k@test ~]$ nohup mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock -e "select sleep(1000);" 2>/dev/null &
[7] 3455828

```

```auto
[k@test ~]$ mysql -umsandbox -pmsandbox -S /tmp/mysql_sandbox8033.sock --port=33062
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 8.0.33-25 Percona Server (GPL), Release 25, Revision 60c9e2c5

Copyright (c) 2009-2023 Percona LLC and/or its affiliates
Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show processlist;
+----+-----------------+-----------+------+---------+-------+------------------------+--------------------+----------+-----------+---------------+
| Id | User | Host | db | Command | Time | State | Info | Time_ms | Rows_sent | Rows_examined |
+----+-----------------+-----------+------+---------+-------+------------------------+--------------------+----------+-----------+---------------+
| 5 | event_scheduler | localhost | NULL | Daemon | 58509 | Waiting on empty queue | NULL | 58508977 | 0 | 0 |
| 44 | msandbox | localhost | NULL | Query | 12 | User sleep | select sleep(1000) | 12513 | 0 | 0 |
| 45 | msandbox | localhost | NULL | Query | 11 | User sleep | select sleep(1000) | 11645 | 0 | 0 |
| 46 | msandbox | localhost | NULL | Query | 11 | User sleep | select sleep(1000) | 11404 | 0 | 0 |
| 47 | msandbox | localhost | NULL | Query | 11 | User sleep | select sleep(1000) | 11159 | 0 | 0 |
| 48 | msandbox | localhost | NULL | Query | 11 | User sleep | select sleep(1000) | 10936 | 0 | 0 |
| 49 | msandbox | localhost | NULL | Query | 11 | User sleep | select sleep(1000) | 10735 | 0 | 0 |
| 50 | msandbox | localhost | NULL | Query | 10 | User sleep | select sleep(1000) | 10434 | 0 | 0 |
| 51 | msandbox | localhost | NULL | Query | 0 | init | show processlist | 0 | 0 | 0 |
+----+-----------------+-----------+------+---------+-------+------------------------+--------------------+----------+-----------+---------------+
9 rows in set (0.00 sec)

mysql> select @@admin_address, @@admin_port, @@thread_pool_size, @@max_connections, @@max_user_connections;
+-----------------+--------------+--------------------+-------------------+------------------------+
| @@admin_address | @@admin_port | @@thread_pool_size | @@max_connections | @@max_user_connections |
+-----------------+--------------+--------------------+-------------------+------------------------+
| 127.0.0.1 | 33062 | 1 | 10 | 10 |
+-----------------+--------------+--------------------+-------------------+------------------------+
1 row in set (0.00 sec)

mysql> show global status like 'threads_connected';
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Threads_connected | 8 |
+-------------------+-------+
1 row in set (0.00 sec)

```

What happens when you do this:

```auto
[k@test ~]$ nc -zv 127.0.0.1 33062
Connection to 127.0.0.1 33062 port [tcp/*] succeeded!
[k@test ~]$

```

`(or telnet 127.0.0.1 33062)`

Let us know.  
K.

---

<div class="post-metadata">

**Author:** ![Chuang\_Pan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/chuang_pan/32/12158_2.png) [@Chuang\_Pan](https://forums.percona.com/u/Chuang_Pan)\
**Post date:** [June 17, 2024, 7:01am UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004/5 "2024-06-17T07:01:28Z")

</div>

> [@kedarpercona](#):
>
> `select @@admin_address, @@admin_port, @@thread_pool_size, @@max_connections, @@max_user_connections;`

I appreciate your message.  
I have tried scores of times.It’s allways hung,that’s my way：

```auto
@#mysql -h127.0.0.1 -P 3306 -utt -ptt
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 174
Server version: 8.0.33-25-20230707 Source distribution

Copyright (c) 2009-2023 Percona LLC and/or its affiliates
Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

@root@(none) 02:51:54>select @@admin_address, @@admin_port, @@thread_pool_size, @@max_connections, @@max_user_connections;
+-----------------+--------------+--------------------+-------------------+------------------------+
| @@admin_address | @@admin_port | @@thread_pool_size | @@max_connections | @@max_user_connections |
+-----------------+--------------+--------------------+-------------------+------------------------+
| 127.0.0.1 | 23306 | 1 | 4500 | 4000 |
+-----------------+--------------+--------------------+-------------------+------------------------+
1 row in set (0.00 sec)

@root@(none) 02:52:01>create user tt@'127.0.0.1' identified by 'tt';
Query OK, 0 rows affected (0.01 sec)

@root@(none) 02:52:01>grant all privileges on *.* to tt@'127.0.0.1';
Query OK, 0 rows affected (0.00 sec)

@root@(none) 02:52:01>select user,host from mysql.user where user='tt';
+------+-----------+
| user | host |
+------+-----------+
| tt | 127.0.0.1 |
+------+-----------+
1 row in set (0.00 sec)

@root@(none) 02:52:02>exit
Bye
[14:52:07root@dc07-prod-db-product-580137 /root]
@#nohup mysql -h127.0.0.1 -P 3306 -utt -ptt -e "select sleep(200)" &
[1] 268671
nohup: ignoring input and appending output to 'nohup.out'
[14:52:18root@dc07-prod-db-product-580137 /root]
@#nohup mysql -h127.0.0.1 -P 3306 -utt -ptt -e "select sleep(200)" &
[2] 268676
nohup: ignoring input and appending output to 'nohup.out'
[14:52:18root@dc07-prod-db-product-580137 /root]
@#nohup mysql -h127.0.0.1 -P 3306 -utt -ptt -e "select sleep(200)" &
[3] 268681
nohup: ignoring input and appending output to 'nohup.out'
[14:52:18root@dc07-prod-db-product-580137 /root]
@#nohup mysql -h127.0.0.1 -P 3306 -utt -ptt -e "select sleep(200)" &
[4] 268686
nohup: ignoring input and appending output to 'nohup.out'
[14:52:18root@dc07-prod-db-product-580137 /root]
@#nohup mysql -h127.0.0.1 -P 3306 -utt -ptt -e "select sleep(200)" &
[5] 268691
nohup: ignoring input and appending output to 'nohup.out'
[14:52:18root@dc07-prod-db-product-580137 /root]
@#nohup mysql -h127.0.0.1 -P 3306 -utt -ptt -e "select sleep(200)" &
[6] 268696
nohup: ignoring input and appending output to 'nohup.out'
[14:52:18root@dc07-prod-db-product-580137 /root]
@#
[14:52:18root@dc07-prod-db-product-580137 /root]
@#ps aux | grep sleep | grep -v grep
www 264109 0.0 0.0 8868 1108 ? S 14:50 0:00 sleep 164
root 268671 0.0 0.0 44112 11960 pts/0 S 14:52 0:00 mysql -h127.0.0.1 -P 3306 -utt -px -e select sleep(200)
root 268676 0.0 0.0 44112 11868 pts/0 S 14:52 0:00 mysql -h127.0.0.1 -P 3306 -utt -px -e select sleep(200)
root 268681 0.0 0.0 44112 12020 pts/0 S 14:52 0:00 mysql -h127.0.0.1 -P 3306 -utt -px -e select sleep(200)
root 268686 0.0 0.0 44112 11760 pts/0 S 14:52 0:00 mysql -h127.0.0.1 -P 3306 -utt -px -e select sleep(200)
root 268691 0.0 0.0 44112 11936 pts/0 S 14:52 0:00 mysql -h127.0.0.1 -P 3306 -utt -px -e select sleep(200)
root 268696 0.0 0.0 44112 12164 pts/0 S 14:52 0:00 mysql -h127.0.0.1 -P 3306 -utt -px -e select sleep(200)
[14:52:41root@dc07-prod-db-product-580137 /root]
@#nc -zv 127.0.0.1 23306
Connection to 127.0.0.1 23306 port [tcp/*] succeeded!
[14:52:49root@dc07-prod-db-product-580137 /root]
@#mysql -h127.0.0.1 -P 23306 -utt -ptt
mysql: [Warning] Using a password on the command line interface can be insecure.

```

hung!

\*\*In my previous example, thread pool set was \*\*  
**thread\_handling=pool-of-threads**

**When i comment this config, it’s default set one-thread-per-connection, this time i’m loggin in succeeded!**

> I think the problem is here：thread\_handling=pool-of-threads

looking forward to your reply!

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [June 18, 2024, 6:15am UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004/6 "2024-06-18T06:15:03Z")

</div>

Hi @Chuang_Pan,  
With thread\_handling value of pool-of-thread, now I see the behaviour you’re describing. Can you please consider raising the [bug report here](https://jira.percona.com).

Additional reference:

> **[How to Report Bugs, Improvements, New Feature Requests for Percona Products](https://www.percona.com/blog/report-bugs-improvements-new-feature-requests-for-percona-products/)**
>
> Here's how to report bugs, improvements, and new feature requests for Percona products. Once validated, issues will move forward for implementation.

Thanks,  
K

---

<div class="post-metadata">

**Author:** ![Chuang\_Pan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/chuang_pan/32/12158_2.png) [@Chuang\_Pan](https://forums.percona.com/u/Chuang_Pan)\
**Post date:** [June 18, 2024, 7:31am UTC](https://forums.percona.com/t/when-thread-pool-is-full-cant-use-admin-port-login/31004/7 "2024-06-18T07:31:54Z")

</div>

Hi @kedarpercona  
I have submitted this bug here  
[https://perconadev.atlassian.net/browse/PS-9265](https://perconadev.atlassian.net/browse/PS-9265)  
Looking forward to your fix,tks!
