title: How to handle timeouts with php5-fpm + nginx timeout php.ini
body: <p>how to handle timeouts with PHP in php5-fpm + ngnix configurations?</p>
  
  <p>I tried to make a simple script with just</p>
  
  <pre><code>sleep(60);
  </code></pre>
  
  <p>php.ini</p>
  
  <pre><code>max_execution_time = 30
  </code></pre>
  
  <p>fast_cgi</p>
  
  <pre><code>fastcgi_connect_timeout 60;
  fastcgi_send_timeout 50;
  fastcgi_read_timeout 50;
  </code></pre>
  
  <p>The script stops at 50s for timeout of the backend. What do I have to do to </p>
  
  <ol>
  <li><p>enable the max_execution_time in php.ini</p></li>
  <li><p>enable ini_set to change the execution time to 0 directly in the
  script</p></li>
  </ol>
  
  <p>Why does fast_cgi get to control timeouts over everything instead of php itself?</p>