Project

General

Profile

Actions

Bug #517

closed

Lighttpd doesn't clean up its fastcgi socket file when shutdown

Added by Anonymous over 15 years ago. Updated over 12 years ago.

Status:
Missing Feedback
Priority:
Normal
Category:
mod_fastcgi
Target version:
ASK QUESTIONS IN Forums:

Description

Lighttpd doesn't clean up its fastcgi socket file when shutdown.

After stopping lighttpd (eg. kill -TERM pid) the fastcgi unix domain socket file stays in place.
On next restart this leads to the following error:


2006-02-11 12:39:49: (mod_fastcgi.c.897) bind failed for: /tmp/fcgi.socket-0 0 Address already in use 
2006-02-11 12:39:49: (mod_fastcgi.c.1325) [ERROR]: spawning fcgi failed. 
2006-02-11 12:39:49: (server.c.834) Configuration of plugins failed. Going down. 

A restart is only possible when removing the old socket file (eg. /tmp/fcgi.socket-).

Tested on OS X 10.4.4 running Rails 1.0 using fastcgi.

Fastcgi configured as follows:


fastcgi.server = ( ".fcgi" =>
  ( "localhost" =>
      (
        "min-procs" => 1, 
        "max-procs" => 1,
        "socket"    => "/tmp/fcgi.socket",
        "bin-path"  => CWD + "/public/dispatch.fcgi",
        "bin-environment" => ( "RAILS_ENV" => "development" )
      )
  )
)

-- lighttpd.net

Actions #1

Updated by stbuehler over 13 years ago

  • Status changed from New to Fixed
  • Resolution set to worksforme
  1. Works for me
  2. In the source there is an unlink(...) before the socket is created. Maybe an old fastcgi backend is listening on the removed socket and that blocks binding the new one?
  3. Lighty does a socket cleanup - it removes the sockets which it spawned.
Actions #2

Updated by stbuehler over 12 years ago

  • Status changed from Fixed to Missing Feedback
Actions

Also available in: Atom