Hello,
When we have a high session count we experience slowness to create new sessions. We are not 100% sure it is on the MySQL end. Is there way to profile connection times to MySQL?
max_connections = 2048
slow_launch_time = 2
Slow_launch_threads = 1.
Once the sessions get above 500 performance degrades. There are no long running queries or excessive cpu, IO or network bandwidth issues.
Thanks.
Hi Jamie_Downs,
What version are you in ?
What is the current value of “back_log”? https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
What is the current value of show global status like ‘%conn%’; ?
Do you see any errors on the error.log?
Last, do you have PMM installed? Installing Percona Monitoring and Management (PMM) Software - Percona
PMM will allow you to monitor all mysql status counters and maybe there is some other underlying issue that you are not getting.
Regards
Hello Carlos,
Many thanks for responding.
We are currently using 5.7. Looking to upgrade to 8.0 later in the year.
back_log = 459.
show global status like '%conn%';
+-----------------------------------------------+---------------------+
| Variable_name | Value |
+-----------------------------------------------+---------------------+
| Aborted_connects | 26890 |
| Connection_errors_accept | 0 |
| Connection_errors_internal | 0 |
| Connection_errors_max_connections | 0 |
| Connection_errors_peer_address | 0 |
| Connection_errors_select | 0 |
| Connection_errors_tcpwrap | 0 |
| Connections | 3555307 |
| Locked_connects | 0 |
| Max_used_connections | 1341 |
| Max_used_connections_time | 2023-03-25 04:06:51 |
| Performance_schema_session_connect_attrs_lost | 0 |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_finished_connects | 0 |
| Threads_connected | 115 |
+-----------------------------------------------+---------------------+
There are no errors in the log.
Do you know if there a way to profile connections?
Hi again Jamie_Downs,
There is no easy way to profile connections on the MySQL server. Likely you will need to do some tests on the OS to discard MySQL, or check what other counters do spike when you experience slowness. For the latter I would suggest you use PMM.
Also make sure that you are up to date with MySQL/Percona Server binaries and the OS version to discard any existing regression or bug.
Regards
Thanks Carlos. We will keep digging.