I have a Joomla1.5 based system. I run the profiler and found that mysql_connect() and mysql_close() both functions have been used 16 times. I know that both of these functions and Joomla 1.5 are deprecated and strongly prohibited by the community. My system is facing performance issue and sometimes during peak hours DB connection threads become too high (>100) and system running slower. While we have a dedicated Windows server.
Below is my DB server configuration:
Windows edition: Windows Server 2008 R2 Standard Service Pack 1
Processor: Intel(R) Xeon(R) CPU X5460 @3.16GHZ 3.16 GHZ (2 Processors)
Installed Memory(RAM): 8.00 GB
System type: 64-Bit Operating system
mysql_connect() function has been used in the constructor of JDatabaseMySQL class. It means whenever we create database object, this mysql_connect() is getting executed and create a new connection.
- I am curious to know whether calling mysql_connect() function multiple times creating such high DB connection threads issue?
- Is it possible to use a single connection instead of initiating objects so many times? If yes, how can I do that?
- Will Replacement of mysql_connection() by mysqli_connect() help us in the improvement of system performance?
- How Joomla manages the connection pool?
Please provide your answer without suggesting upgrading Joomla.