Project

General

Profile

Bug #517

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

Added by Anonymous almost 14 years ago. Updated over 11 years ago.

Status:
Missing Feedback
Priority:
Normal
Assignee:
-
Category:
mod_fastcgi
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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

#1

Updated by stbuehler almost 12 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.
#2

Updated by stbuehler over 11 years ago

  • Status changed from Fixed to Missing Feedback

Also available in: Atom