Effective effect of not closing the connection

I am using symfony 1.4 / propel 1.4 for a project that was previously made by another developer. In this project, the wire connection is done using the following code

$con = Propel::getConnection(UsersPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); 

However, it never closes the connection using

 Propel::close(); 

I just searched that there are 1500+ such cases of opening a connection, and I think that none of them close the connection.

I always know it is good practice to close the connection, but in this case it seems that I will not be able to fix them all, since fixing all incidents will definitely take a lot of time, maybe a whole day. So now I'm confused if I have to fix it or not. If I let it be like this, will it have an impact on performance?

EDIT: for reference only

Part 2 of this question Using a private database connection in php

0
source share
1 answer

If anything, explicit closure of the connections can be detrimental to performance. PDO often caches connections from one request to the next, based on the reasonable assumption that the next request will use the same credentials.

Edit: after reading the docs , it seems to me that the PDO :: ATTR_PERSISTENT connections are cached regardless of attempts to close them, so you might as well not bother.

+1
source

All Articles