Ticket #371 (closed defect: worksforme)
Dynamic FastCGI support in need of TLC
| Reported by: | sam@… | Owned by: | anonymous |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | mod_fastcgi | Version: | 1.4.5 |
| Severity: | normal | Keywords: | fastcgi dynamic |
| Cc: | Blocked By: | ||
| Need User Feedback: | no | Blocking: |
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.

