title: Interpreting, Write failed: Broken pipe message for cli php script
body: <p>I'm running a php script from ssh with the following command</p>
  
  <pre><code>./script.php &amp;
  </code></pre>
  
  <p>The script is a has a loop in is supposed to loop about 800,000 times (so it takes a few days to run). However it is currently stopping a couple thousand loops into the process. My error handlers are not catching any error from the script but the console reads.</p>
  
  <pre><code>Write failed: Broken pipe
  </code></pre>
  
  <p>Can anyone shed any light on what this message means, what kind of problem this indicates, and how I might go about tracking it down?</p>
  
  <p>Update:</p>
  
  <p>To summarize what the script does it selects 800,000 row from a table in my data base (hosted on the same server as the script). For each row it makes a rest call to a third party site and then writes that data to a different table in the same database (hosted on the same server as the script).</p>