Skip to Main Content

MySQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to set up thread_cache_size in MySQL 5.7

3643234Sep 26 2018 — edited Oct 3 2018

Hi,

We are using MySQL 5.7.22 On windows-2012R(16gb RAM,12 gb innodb buffer pool size)machine and we have observed many new threads have been created(1938) and threads_cached(4),threads connected(198) and threads running(4) therefore i am suspecting we need to tune thread cache size therefore kindly help how to determine required thread cache size and tune?  However, i have seen many queries are sleep and is it feasible to reduce wait time out from default 28800 sec to lower number?

Thanks in advance.

Regards,

Upender

This post has been answered by Dave Stokes-MySQL Community Team-Oracle on Sep 28 2018
Jump to Answer

Comments

Jim-D

Welcome Upender! The Getting Started space is intended for discussions about the Oracle Developer Community, not for product-specific questions.

There are tips on how to find the correct space on the page, which also has instructions on how to change your display name so you're not just a number.

In the ACTIONS box on the right of your post, you should be able to click on "Move", and then specify the correct space - such as - so the MySQL experts can see your question. (A moderator here may move the post for you.)

Thanks and good luck!

MOSC Move.png

Answer

It is very rare to have to adjust the thread cache size (in your server's my.cnf or my.ini) unless you are seeing a lot of new connections constantly.  Setting the wait_timeout may do what you want. 

I would suggest running MySQL Workbench to watch these connections to get more data/

Marked as Answer by 3643234 · Sep 27 2020
1 - 2

Post Details

Added on Sep 26 2018
2 comments
1,230 views