Persistant mysql connections

HI, I am trying to understand how I can enable a C5 install to use persistant connections to a Mysql database.
The C5 instance is legacy and maybe its not possible. C5 is, php is 5.6.40
Mysql is more up to date and runs on a separate server. This system as it stands has been running well for a number of years, 10+ and was updated to the latest legacy when it was released. The reasons are in an attempt to gain a little more performance from the system, and allow us to better manage the resources being used on the mysql server.
As part of this we would want to set the in pool size and the max pool size.

I have done a whole raft of reading and searched through the code, I am sure I am close to understanding thia but have now ground to a halt. Can anyone provide guidance on this?

Please not upgrading to is not an option it is a very heavily customised site so upgrading is not simple.


@FaganSystems have you tried adding ?persist=true to the name of the database in config/site.php? That seems to work for me (and does seem a bit faster).

I have tried this, the site has two databases, the core database it does seem to work ok, but the data DB is built using a custom-built system. I am not giving up on this I will need to find out how the core is working and make sure that the data DB is using a compatible approach. Thanks for the reply.

Likely you already know this, the quickest way to get performance out of a 5.6.4 site is to run it under php7.4

HI John, I wish it was that simple, yes I know that running on PHP 7.4 would improve performance, but the issue we have is as follows. The non-core system database is being accessed by a number of other systems, to read and update data these are using a fixed minimum number of persistent connections, when the demand on these systems increases they spawn additional database connections which results in C5 not being able to make additional connections. I have now increased the allowed number of connections to ~500 on the database server so we will see how it performs now. Regarding performance we are getting good speed from the servers in the C5 system, all are blade servers running on dedicated hardware with 64GB of available ram for the web server. Thanks for the reply