I have a PHP 8.1 application deployed on Azure App Service, Nginx and PHP-FPM which is supposed to have long running scripts.
The process is working fine for upto 5 requests at a time, but when I am making a 6th request, that request waits until one of the first 5 requests finishes.
To test this, I have a simple php script which writes to a file for 20 seconds and then finishes up.
<?php
$i=20;
$while($i){
file_put_contents("file.txt", "count: $i");
sleep(1);
$i--;
}
?>
Being new to both Nginx and Azure App Service I am not able to figure out which one is block the number of requests. After some google search, it seems nginx should be able to handle 512 concurrent requests but it's not. Azure app service doesn't seem to have any such limit either.
Would help a lot if pointed in the right direction. Thanks