title: PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity
body: <p>I read everything I could about this error without being able to find any solution. </p>
  
  <p>I have a simple page that looks like this: </p>
  
  <pre><code>$xmlfile = "/var/www/marees.xml"; //Fichier dans lequel récupérer les données
  $ent = new DOMDocument();
  $ent-&gt;load($xmlfile);
  
  if(!(@$ent-&gt;load($xmlfile)))
  {
      echo "Unable to load : " . $xmlfile;
      exit();
  }
  </code></pre>
  
  <p>I get three times out of four, randomly this error: </p>
  
  <blockquote>
    <p>PHP Warning:  DOMDocument::load(): I/O warning : failed to load external entity "/var/www/marees.xml" in /var/www/marees/test2.php on line 7</p>
  </blockquote>
  
  <p>When I restart Apache, the script works fine for 5 minutes, then the error starts to appear. </p>
  
  <p>XML file weighs 595 kB, is present and readable. </p>
  
  <p>What might be the problem?</p>