Bug #371
closedDynamic FastCGI support in need of TLC
Description
Hi there,
If you are starting a dynamic process:
"/dynamic/" => ( ( "bin-path" => "/path/to/script.fcgi", "socket" => "/tmp/why", "min-procs" => 1, "max-procs" => 4, "max-load-per-proc" => 4, #"port" => 1234, "check-local" => "disable", "disable-time" => 1, ) )
For a start, there is no reason to name the socket. It should be passed on STDIN. However lighttpd does not accept a configuration with no socket or port. If you specify a port but no hostname, you get a tight loop and gigabytes of logs.
Secondly, it seemed to start "max-procs" rather than "min-procs" on startup.
Thirdly, those processes were not disassociated from the terminal on which lighttpd was started. Their STDERR still pointed to the STDERR of the starting terminal. When you daemonize, you need to close all file descriptors, and re-open STDIN, STDOUT and STDERR to/from /dev/null. Though, ideally you'd want the STDERR of dynamically started applications to go to the server error log.
-- sam
Updated by jan over 19 years ago
- Status changed from New to Assigned
1. The docs say that adaptive-spawning is disabled since some releases and that min-procs is ignored.
2. STDIN, STDOUT and STDERR are bound by fastcgi process to be routed over the fastcgi-channel.
Yes, the fds for STDOUT and STDERR should be closed.
3. The FastCGI process expected that fd=1 (aka stdin) is bound to a socket (unix-domain or tcp/ip). The only other way is using a socketpair (name-less socket) which is currently not implemented.
4. the STDERR of the fastcgi process goes to the server-errorlog.
I advise the check the fastcgi-spec again
http://www.fastcgi.com/devkit/doc/fcgi-spec.html
or to rephrase your concerns.
Updated by stbuehler over 16 years ago
- Status changed from Assigned to Fixed
- Resolution set to worksforme
FastCGI should get detached in current svn versions. Missing feedback anyway.
Updated by stbuehler over 16 years ago
- Status changed from Fixed to Missing Feedback
Updated by gstrauss about 1 year ago
- Description updated (diff)
- Status changed from Missing Feedback to Fixed
- ASK QUESTIONS IN Forums set to No
original poster's list of items were addressed long ago.
Also available in: Atom