Home > Mobile >  Apache, Php, Centos7 server whole application do not respond when any long running php page is calle
Apache, Php, Centos7 server whole application do not respond when any long running php page is calle

Time:01-05

I have deployed an Apache, Php, Linux Centos7 server. The application is in Yii2. The whole web application hangs when any long running php page is called and all the scripts responds as soon as long running task ends.

Can some one help where can be the problem. Is it apache configuration or php or Yii2 how to debug this type of error. What to monitor. Which logs to read.

The web server is responding very fast to small php scripts. But once a long running php script start whole server start responding become slow and only respond after the long running php script is done.

My understanding says that every request is independent of each other but I am not able to debug why this long running task is delaying execution of other small php scripts.

For Example by long running task I mean I am generating a pdf report which will take 1-2 minute to output content in PDF format. If I am opening the other page with simple echo statement it just shows loading curser in tab and respond as soon as the pdf task complete.

My setup is apache 2.4, php 7.3, centos 7, Yii2 framework.

Need guidance where to look for. Thanks

CodePudding user response:

This is possibly due to PHP session lock - only 1 request per user at the same time is possible.

Check out this article for more details: https://ma.ttias.be/php-session-locking-prevent-sessions-blocking-in-requests/

  •  Tags:  
  • Related