Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25596

eZDBFileHandlerMysqliBackend create too many connections

    Details

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ivan Ternovtsiy
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: