This issue is happening automatically in the live server.
$mysqli = new mysqli("localhost","user","password","database");
if ($mysqli -> connect_errno) {
echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
exit();
}
When I refresh the page continues, some time works and sometimes returns php_network_getaddresses: getaddrinfo failed: System error
What could be the issue?