Why php process wait another one?

时间:2018-07-25 05:01:11

标签: php nginx plesk fpm

This days, my server has a problem.

2 different PHP process can't run one time.

Let's say if I has a PHP process running within 30 seconds.

I want to run another PHP process at the same time while first process still running and not yet done. But the 2nd process can't run right away, it will wait for the first process done then it run after that.

This doesn't happen earlier.

How to fix that?

Example php files:

file1.php:

sleep(30); exit('done);

file2.php:

exit('done');

My server use plesk, php 7.x PHP-FPM Nginx

1 个答案:

答案 0 :(得分:0)

好的,这就是我遇到问题的原因。

我在两个文件中都使用了session_start(),当第一个文件运行时,季节锁定了,第二个文件必须等待锁定的发布。

感谢@LawrenceCherone的回答