title: Yet another weird Maximum execution time of 0 seconds exceeded, while pg_query() this time
body: <p>I have a php script processing some big data from database. It takes it from table by N(tried from 100 to 100000) rows and inserts it other table. <code>max_execution_time</code> is set to 0. Every iteration is wrapped in transaction. When selecting each portion I use <code>pg_query()</code>. But after 1-2 hours my script fails with <code>Maximum execution time of 0 seconds exceeded</code>, with error message pointing to the line with <code>pg_query()</code>. Did anyone have this issue? Any cure?</p>
  
  <p><strong>UPD</strong>:</p>
  
  <p>Having tried the answer proposed <a href="https://stackoverflow.com/questions/10853220/zend-lucene-fatal-error-maximum-execution-time">here</a> -- setting max_input_time to -1 -- still have no luck. The error moved from <code>pg_query</code> line to another line, which seems to be a pretty random one. So <code>pg_query</code> I guess has nothing to do with that, as well as <code>max_input_time</code>.</p>