Enabling Persistent Connections / too many sleeps / too many time_waits
Hi ya all!
We are facing a somehow weird problem.
We have a Magento 2.2.5 split in two different servers. Server A is loaded with everything that Magento 2 needs, except MySQL.Server B hosts only the database. Please note that the website is crowded, around 200k skus and around 700 orders per day.
The website is running smoothly and really speedy (Varnish). The problem starts when we are trying to update stuff through API calls. They are really slow and honestly i cannot find any reason why they are slow. From what I have understood so far, I see that we have many time_waits and many sleeps in the database and the webserver.
From Google search attempts, I have come down to the conclusion that somehow we need to enable Persistent connections.
My first question is "will it solve my problem? I have only slow API calls " and the second is "how do you enable persistent connections?"