title: PHP script timing out/not running to completion
body: <p>Part of a project I'm working on means running lots of benchmarks on cloud instances. To make it easier on myself, I want to make them runnable via the web and get the output printed straight to the browser window.</p>
  
  <p>This seems to work fine, however, the script 'stops' after about 10 minutes of run time (i.e. the browser stops loading) - less than halfway through my benchmark, and I have no idea why. SSHing into the server and calling <code>top</code> shows that the process is stopping as well - but it will complete if I call <code>./runscript.sh</code> from the command line.</p>
  
  <pre><code>&lt;?php
  
  set_time_limit(0);
  ignore_user_abort(1);
  
  header("Content-type: text/plain");
  
  
  ob_implicit_flush(true);
  ob_end_flush();
  
  $old_path = getcwd();
  chdir("UnixBench");
  passthru("./runscript.sh");
  chdir($old_path);
  ?&gt;
  </code></pre>
  
  <p>In this instance, <code>runscript.sh</code> is simply</p>
  
  <pre><code>#!/bin/bash
  
  ./Run &amp;
  wait $!
  </code></pre>