title: Apache is not responding during expensive PHP operation
body: <p>My problem is that while I'm rebuilding the cache (a very long <code>for</code> loop) in my PHP localhost website, Apache stops responding completely - if I open any page on my site, it will be loading as long as cache is rebuilding, which might take an hour (it's not very well optimised but that's beside the point). When the cache is ready and no expensive operation is being performed, everything opens just fine. It seems like there's only a single thread running, so when a single script is being executed for a long time, nothing else can be opened.</p>
  
  <p>I'm using XAMPP (Apache, PHP) on Windows 7. Apache is configured to use WinNT MPM. Here's a relevant part of config file:</p>
  
  <pre><code># WinNT MPM
  # ThreadsPerChild: constant number of worker threads in the server process
  # MaxConnectionsPerChild: maximum number of connections a server process serves
  &lt;IfModule mpm_winnt_module&gt;
      ThreadsPerChild        150
      MaxConnectionsPerChild   0
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I'm obviously not running into 150 thread limit, the expensive operation I'm talking about is a single long <code>for</code> loop executed in a single script, so it should be taking just a single thread.</p>
  
  <p>Here's what a process structure for Apache looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/M7KcE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M7KcE.png" alt="screenshot"></a></p>
  
  <p>Only two processes, an idle parent and a child that performs the operation. Maybe there's a way to make Apache increase the amount of processes it creates for PHP? Any ideas on how this can be debugged?</p>
  
  <p>Also, please, note that the problem only exists on localhost, it works fine on a production server, i.e. it can render other pages while the cache rebuilding is in the progress, so I know that it has something to do with the configuration.</p>