1

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?

2
  • If others requests are coming from the same browser, it may try to reuse the same socket to send the next request, and in your case, the socket is definitely busy on server side. Have you tried from another computer? Have you also checked if apache have enough threads to handle concurrent clients? (Btw, which MPM are you using? prefork/worker ?) And last idea, is there enough free cpu and memory on the server at that time?
    – Elektordi
    Feb 15 '19 at 11:11
  • Consider logging messages to trace the executions. It must be more than just the DB query. I would also check cpu utilization and apache idle server threads. I suspect that all the threads are pre-occupied by a faulty client calls.
    – XP.
    Nov 16 '20 at 18:26
0

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.

2
  • are you talking about db or php sessions? Anyway, the problem is global and not relative a single user session, after the faulty script is run, noone can run any other page of the application Nov 14 '11 at 15:32
  • The problem is also relative to pages which not connects to the DB, so if you meant PHP locks DB session file exclusively, still the pages without DB communication should work, but they dont. Nov 14 '11 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.