Local Community

Increase number of PHP FastCGI processes to serve simultaneous requests

Issue Summary

I noticed that my Local site appears to have only two CGI / FastCGI processes. This setup means that my site can only accommodate two HTTP requests at the same time. I would like to increase this number of FastCGI processes so that my localhost site can serve additional HTTP requests simultaneously.

My setup uses nginx webserver so normally it’s as simple as just tweaking the upstream php block (example here). The default site.conf.hbs appears to be the right config to adjust this; however, the handlebar file uses fastcgi_servers variable which I don’t know if it’s possible to adjust nor could I find any documentation on this variable:

upstream php {
  {{#each fastcgi_servers}}
  server {{this}};

This question appears to be similar to this one although no responses were given.

System Details

  • Local v5.9.8+5191 on Windows 10 20H2
  • Site is using PHP 8 with nginx and MySQL 8

Hey again, David.

I’d like to post the answer that previously recommended and confirmed working here for the community to use:

Mac creates PHP children (process) using php-fpm . With Windows, Local create php-cgi.exe instances to emulate php-fpm . This is the first time a user is asking to configure the PHP processes. Therefore, we can’t guarantee this would work properly. This can be configured by doing the following:

  1. Head to %APPDATA%\Roaming\sites.json
  2. You can hack the file into spawning more processes by adding additional (previously unoccupied) ports to the PHP services port array.
  3. Stop the site and restart Local.

Thanks for testing it out!

1 Like

Just to clarify that the path to this file is actually:


This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.