Change
Close db connections
Issue description
Using a store opens a connection to the MySQL database. When the PHP process finishes, PHP automatically closes the connection. But during unit tests or during long lived PHP processes with multiple stores in general the number of open db connections increases over time. At some point the maximum number of connections is reached and then there is simply no continuation. In case of the nightly tests this is noticeable since the log file has no entry from 2300 to 0700.
Developer comments
Generally the following rule should apply: where an instance of the PHP class %Store% is created, the db connection should be closed best in the same function or in the same class. In some cases this not necessary or even should be avoided, since database access is necessary in shutdown. These cases are %AdminCommand->execute% and %topincs.php%.
|
Work sessions2
Start |
2025-06-29T14:55:23
|
End |
2025-06-29T18:03:11
|
Participant |
Robert Cerny
|
Start |
2025-06-30T08:00:00
|
End |
2025-06-30T09:24:09
|
Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.