title: PHP infinite loop is stopping on first minute of every hour
body: <p>Any idea why a simple infinite loop stops on the very first minute of every hour? For instance, 21:01, 22:01, 23:01, etc.</p>
  
  <p>The server is running Ubuntu 12.04 and the PHP script is launched using command: "php -f test.php" </p>
  
  <pre><code>while (1 == 1) {
      echo "test";
      sleep(30);
  }
  </code></pre>
  
  <p>Any help is appreciated.</p>
  
  <p><strong>UPDATE:</strong> It doesn't matter whether I run the script 16:05 or 16:49, it will stop on 17:01, so the issue is not related to the <em>set_time_limit</em> value.</p>
  
  <p><strong>UPDATE:</strong> If the script has to sleep for an hour and then echo "test", the "test" will not be echoed. The script stops it's work without finishing the loop itself.</p>
  
  <p><strong>UPDATE:</strong> It seems that I've found out what's killing the script. I've set the PHP script to report All errors and right before the *:01 time comes up, I get the text: <em>Terminated</em>. I've Googled that the script might get <em>Terminated</em> by OOM killer and, unfortunately, I don't have permission to change it's settings on my current VPS. I'm switching to VDS and will try to modify OOM killer settings.</p>