Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
5.4.4
Description
Let's say we have a limit of mysql connections set to 1000 and want to store 1001 files with eZClusterFileHandler::instance
for($i = 0; $i <= 1001; $i++) { eZClusterFileHandler::instance('var/file_' . $i . '.cache')->storeContents($i); }
Suggested solutions:
1) Add mysqli_close into __destruct (safe and easy option)
2) Use static for eZDBFileHandlerMysqliBackend::db property. Looks like eZ Kernel not using eZDBFileHandlerMysqliBackend->_connect(true) and we don't need to create separate connection per instance.