Using a minimal fastcgi/nginx configuration on ubuntu 18.04, it looks like nginx only handles one fastcgi request at a time.
# nginx configuration
location ~ ^\.cgi$ {
# Fastcgi socket
fastcgi_pass unix:/var/run/fcgiwrap.socket;
# Fastcgi parameters, include the standard ones
include /etc/nginx/fastcgi_params;
}
I demonstrate this by using a cgi script like this:
#!/bin/bash
echo "Content-Type: text";
echo;
echo;
sleep 5;
echo Hello world
Use curl to access the script from two side-by-side command prompts, and you will see that the server handles the requests sequentially.
How can I ensure nginx handles fastcgi requests in parallel?