Multiple php requests simultaneously, second request doesn't start until first finishes

The built-in server supports multiple workers from PHP 7.4 onward (on platforms where fork() is available). See this commit: https://github.com/php/php-src/commit/82effb3fc7bcab0efcc343b3e03355f5f2f663c9

To use it, add the PHP_CLI_SERVER_WORKERS environment variable before starting the server. For example:

PHP_CLI_SERVER_WORKERS=10 php7.4 -S 127.0.0.1:7080 index.php

I recommend upgrading your PHP 7.2 installation if you want to utilize this feature.


The built in web server is a single-threaded, single-process, synchronous server. It's only meant for testing purposes. It can only handle a single request at a time. It cannot serve multiple concurrent requests at the same time.