title: apache/php-fpm stops responding when executing a script
body: <p>i have a case that I'm having issues troubleshooting. I have a PHP script that executes many queries (postgres) for data analysis so they get cached and can be loaded up quickly for the user. This php script loops through certain input parameters, data and generates about 50-60 sql queries, executes them, and stores them in a db cache. Some queries take 2-3 seconds, others few minutes.</p>
  
  <p>After its execution everything works perfectly, but when they are running, Apache does not seem to respond to any access to the site (the browser just hangs on 'waiting for server'). PHP-FPM status only shows 3 active processes (the limit is 50). The server has 160GB ram and mulitple multi-core cpu and only running this application. If I restart php-fpm, the site responds again and works normally. The server load during execution is very low (~1.5 in top, it has 64 cores to use).</p>
  
  <p>I cannot seem to find why Apache/php-fpm seems to not respond to any other user until the process is fully complete even though I'm the only user and there's few processes running. Everything else on the server runs super fast (phpmyadmin, pgadmin, terminal, etc.) . 
  At first, thought it was php-fpm reaching its limit, but did not seem to be the case after adjusting parameters,</p>
  
  <p>Would appreciate any pointers on how/where to look.
  thanks</p>