# MySQL Threadpool with admin port/connection behavior

**URL:** <https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944>\
**Category:** Percona Server for MySQL 8.0\
**Created:** [February 26, 2025, 9:42pm UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944 "2025-02-26T21:42:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitin](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nitin](https://forums.percona.com/u/nitin)\
**Post date:** [February 26, 2025, 9:42pm UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/1 "2025-02-26T21:42:30Z")

</div>

Hello Percona Team,  
I am trying out MySQL threadpool and observed a behavior. Wanted to confirm if it is by design!  
Say, I am running threadpool with threadpool\_size=1 and threadpool\_oversubscribe=3.  
Then I try to connect clients to server one by one and let the connection do some heavy select operation.  
After 4 client connections, even an ADMIN connection is not go through and hangs.  
Is this an expected behavior?

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 26, 2025, 11:06pm UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/2 "2025-02-26T23:06:25Z")

</div>

Hi @nitin welcome to the Percona forums!  
You should be able to make an ADMIN connection to the database using the Administrative Interface via `--port=33062`

> - There is no limit on the number of administrative connections, but connections are permitted only for users who have the [`SERVICE_CONNECTION_ADMIN`](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_service-connection-admin) privilege.

[https://dev.mysql.com/doc/refman/8.0/en/administrative-connection-interface.html](https://dev.mysql.com/doc/refman/8.0/en/administrative-connection-interface.html)

---

<div class="post-metadata">

**Author:** ![nitin](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nitin](https://forums.percona.com/u/nitin)\
**Post date:** [February 27, 2025, 3:01pm UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/3 "2025-02-27T15:01:45Z")

</div>

The admin connection I am trying do have SERVICE\_CONNECTION\_ADMIN privilege.  
I believe the reason is code [percona-server/sql/threadpool\_unix.cc at 8.0 · percona/percona-server · GitHub](https://github.com/percona/percona-server/blob/8.0/sql/threadpool_unix.cc#L423C13-L423C34) “too\_many\_busy\_threads(\*thread\_group)” does not allow the admin connection to login!  
The worker is not able get/remove the request from the event queue.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 27, 2025, 5:39pm UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/4 "2025-02-27T17:39:58Z")

</div>

Hi @nitin  
Can you confirm you were connecting with `--port=33062` ?

---

<div class="post-metadata">

**Author:** ![nitin](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nitin](https://forums.percona.com/u/nitin)\
**Post date:** [February 27, 2025, 10:38pm UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/5 "2025-02-27T22:38:26Z")

</div>

- Started the server options “–thread-handling=pool-of-threads --thread-pool-size=1 --admin\_address=127.0.0.1 --admin\_port=33062”
- Connected the client with “–protocol=TCP --port=33062”
- So i suppose it is an admin client connection, not sure if there is any way to cross check though.
- The default value of threadpool\_oversubscribe=3 and for testing we set threadpool\_size to 1.
- So, 4 clients happily connected (admin or non) and started executing heavy select queries (became busy).
- Now when trying to establish the 5th connection :  
- A NON-ADMIN connection cannot established as expected, because we have exceeded oversubscription limit. Please confirm my understanding!  
- But I expected an ADMIN connection now should go through and should NOT honor oversubscribe limit. Please confirm my understanding!

---

<div class="post-metadata">

**Author:** ![nitin](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@nitin](https://forums.percona.com/u/nitin)\
**Post date:** [February 27, 2025, 11:08pm UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/6 "2025-02-27T23:08:47Z")

</div>

Probably, related to [Jira](https://perconadev.atlassian.net/browse/PS-9265)

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 28, 2025, 1:10am UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/7 "2025-02-28T01:10:07Z")

</div>

Looks to be the case. My suggestion is to add yourself as a watcher and upvote that ticket for visibility.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 28, 2025, 1:10am UTC](https://forums.percona.com/t/mysql-threadpool-with-admin-port-connection-behavior/36944/8 "2025-02-28T01:10:17Z")

</div>


