mysqli object is already closed (500 Whoops, looks like something went wrong.)

Error

HTTP 500 Whoops, looks like something went wrong.

mysqli object is already closed

Exception

Error

  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. // Close session to collect possible session-related queries.
  2. $this->getApplication()->getSession()->close();
  3. // Call $db->disconnect() here to trigger the onAfterDisconnect() method here in this class!
  4. $this->getDatabase()->disconnect();
  5. $this->debugBar->addCollector(new QueryCollector($this->params, $this->queryMonitor, $this->sqlShowProfileEach, $this->explains));
  6. }
  7. if ($this->showLogs) {
  8. $this->collectLogs();
  1. foreach ($this->listeners[$event->getName()] as $listener) {
  2. if ($event->isStopped()) {
  3. return $event;
  4. }
  5. $listener($event);
  6. }
  7. }
  8. return $event;
  9. }
  1. $dispatcher = $this->getDispatcher();
  2. } catch (\UnexpectedValueException $exception) {
  3. return null;
  4. }
  5. return $dispatcher->dispatch($eventName, $event ?: new ApplicationEvent($eventName, $this));
  6. }
  7. /**
  8. * Method to run the application routines.
  9. *
  1. // Send the application response.
  2. $this->respond();
  3. // Trigger the onAfterRespond event.
  4. $this->dispatchEvent(
  5. 'onAfterRespond',
  6. new AfterRespondEvent('onAfterRespond', ['subject' => $this])
  7. );
  8. }
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application = $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/var/www/vhosts/coloresunidos.com/httpdocs/includes/app.php') in /var/www/vhosts/coloresunidos.com/httpdocs/index.php (line 51)
  1. // ... die
  2. die();
  3. }
  4. // Run the application - All executable code should be triggered through this file
  5. require_once __DIR__ . '/includes/app.php';

Stack Trace

Error
Error:
mysqli object is already closed

  at /var/www/vhosts/coloresunidos.com/httpdocs/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318
  at mysqli->close()
     (/var/www/vhosts/coloresunidos.com/httpdocs/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318)
  at Joomla\Database\Mysqli\MysqliDriver->disconnect()
     (/var/www/vhosts/coloresunidos.com/httpdocs/plugins/system/debug/src/Extension/Debug.php:322)
  at Joomla\Plugin\System\Debug\Extension\Debug->onAfterRespond()
     (/var/www/vhosts/coloresunidos.com/httpdocs/libraries/vendor/joomla/event/src/Dispatcher.php:454)
  at Joomla\Event\Dispatcher->dispatch()
     (/var/www/vhosts/coloresunidos.com/httpdocs/libraries/vendor/joomla/application/src/AbstractApplication.php:99)
  at Joomla\Application\AbstractApplication->dispatchEvent()
     (/var/www/vhosts/coloresunidos.com/httpdocs/libraries/src/Application/CMSApplication.php:347)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/var/www/vhosts/coloresunidos.com/httpdocs/includes/app.php:58)
  at require_once('/var/www/vhosts/coloresunidos.com/httpdocs/includes/app.php')
     (/var/www/vhosts/coloresunidos.com/httpdocs/index.php:51)                
An Error Occurred: Whoops, looks like something went wrong.

Sorry, there was a problem we could not recover from.

The server returned a "500 - Whoops, looks like something went wrong."

Help me resolve this