简体   繁体   中英

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

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

Refer to this official documentation on App Service limits , For Standard or greater tier the limit is 5 Concurrent debugger connections per application but for WebSocket's for Standard tier and above, there are no theoretical limits to web sockets, but other factors can limit the number of web sockets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM