On debian 7.0 is lighttpd + php-cgi.

I am writing after any manipulations with the config

reboot // ждем, пока перезагрузится, подключаемся к ssh заново ps -A | grep php 

Here is the console output:

  3632 ? 00:00:00 php-cgi 3637 ? 00:00:00 php-cgi 3649 ? 00:00:00 php-cgi 3651 ? 00:00:00 php-cgi 

Is it possible to somehow limit the number of php-cgi-processes (workers)?

I generally need the http-server only as a web-muzzle to the application, and I will connect one, and here 4 processes.

  • read [documentation] ( wiki.archlinux.org/index.php/… , search by the word "max-procs"). It's simple. But I would not touch. - KoVadim
  • @eicto, thanks - zooZooz
  • @KoVadim, from English. not really yet. - zooZooz
  • There, in fact, even in Russian, only the link turned out to be a curve, the hint “search by word” got into it. Here is the link: wiki.archlinux.org/index.php/ ... Search keyword max-procs. PS and I advise you to read mana in the original, it is not difficult (the language there is far from Shakespeare, and often not native English-speaking people write them). In Russian, the information is certainly not small, but still much less (and its average quality is lower, for retellings) than in English. - MrClon
  • one
    > Already 3 times reinstalled VPS, trying to redo everything So what for? The more you remake, the more chances you have to mess around, the harder it will be for you to figure out what has been done before. Any change should be made only if you understand why you are doing this. - MrClon

1 answer 1

better not to change this value.

but if you really need to, then in the fastcgi.server configuration, fastcgi.server should change the max-procs :

 fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/var/run/lighttpd/php-fastcgi" + PID + ".sock", "max-procs" => 4, # значение по умолчанию "bin-environment" => ( "PHP_FCGI_CHILDREN" => "1", # значение по умолчанию "PHP_FCGI_MAX_REQUESTS" => "10000" ), "broken-scriptfilename" => "enable" )) )