We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e9a929 commit 70bf029Copy full SHA for 70bf029
1 file changed
src/HealthCheck/DoctrineConnectionHealthCheck.php
@@ -58,11 +58,9 @@ public function check(HealthReportInterface $report)
58
$table = reset($tables);
59
// Perform a light-weight query on the chosen table
60
$query = 'SELECT * FROM `%s` LIMIT 1';
61
- $this->entityManager->getConnection()->exec(sprintf($query, $table->getName()));
+ $this->entityManager->getConnection()->query(sprintf($query, $table->getName()));
62
}
63
} catch (Exception $e) {
64
- // On error close the connection to prevent sleeping processes
65
- $this->entityManager->getConnection()->close();
66
return HealthReport::buildStatusDown('Unable to execute a query on the database.');
67
68
0 commit comments