Php – Apache doesnt respond after PHP script execution takes too long

apache-2.2PHPzend

We have a PHP application built with the Yii Framework, which connects to an Oracle DB and runs on Apache configured with Zend Core For Oracle.
Apache also runs another application on a different port.

We have a page that makes a complex query to the DB that takes about 10 minutes to run. We are in the process of reducing the time this query takes, but for now this is a problem.

The problem is that after calling the PHP page, no other pages respond, even ones that do not query the DB. The other application that Apache runs, which doesn't use Yii and uses a different DB, also is unresponsive.

Why is this happening? Shouldn't Apache be able to handle several request at the same time even if one is still running?

The error given from Apache is the following, which should be a generic message error given when communication with the DB fails:

fcgi: Can not read response from D:\Programmi\Zend\Core For Oracle\bin\php-cgi.exe

We didn't touch much of the default Apache configuration, so the maxClients and ServerLimit should be set to 256 (default)

Any idea where to look for the problem?

Best Answer

Anyway the problem is that, after calling the php page, all the application get "stuck", no other pages respond, even the ones without query to the DB

Do you use sessions in that DB? PHP exclusively locks session file until the script finishes executing.

Related Topic