in reply to Benchmarking Perl's Net::Async::FastCGI app consistently return LOTS of "Non-2xx responses"

Does reducing the concurrency help? Does using a port instead of a socket make a difference?
  • Comment on Re: Benchmarking Perl's Net::Async::FastCGI app consistently return LOTS of "Non-2xx responses"

Replies are listed 'Best First'.
Re^2: Benchmarking Perl's Net::Async::FastCGI app consistently return LOTS of "Non-2xx responses"
by Anonymous Monk on Dec 04, 2025 at 21:03 UTC
    I already tried reducing both the number of total requests to 40, and concurrent requests to 20; and it still returns 24 "Bad Gateway"s. Since a concurrent requests level of 20 is really child-play, there's something very funky going on here. Using TCP port number instead of Unix socket makes it even worse. I literally use the helloworld example verbatum (except for the Unix socket tweak) from the Net::Async::FastCGI examples on metacpan.org. So kinda of run out of idea here...

      Maybe try reducing the concurrency to 1 and 2, just to see if you are at all able to have more than one request in flight at the same time?

        From ApacheBench result above, 15 out of 100 requests return a successful 200 OK code, while 85 of them return the 502 Bad Gateway.
Re^2: Benchmarking Perl's Net::Async::FastCGI app consistently return LOTS of "Non-2xx responses"
by Anonymous Monk on Dec 04, 2025 at 21:10 UTC
    Could someone try running the same thing and see if you experiencing the same issue? All u need is Perl 5.14 or above, install the module Net::Async::FastCGI and the Nginx web server, then configure Nginx with the little snippet to hook it up to the helloworld FastCGI script, then run the script on one terminal, and start Nginx on another terminal.