Score:0

Azure App Service + Nginx not able to handle more than 5 concurrent requests

us flag

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

Lex Li avatar
vn flag
What is your PHP FPM pool setting? Edit the question to include that.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.