Ticket #517 (closed defect: worksforme)

Opened 3 years ago

Last modified 6 months ago

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

Reported by: lighttpd.net@… Owned by: jan
Priority: normal Milestone: 1.4.19
Component: mod_fastcgi Version: 1.4.10
Severity: normal Keywords: fastcgi
Cc: Blocked By:
Need User Feedback: no Blocking:

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" )
      )
  )
)

Attachments

Change History

Changed 6 months ago by stbuehler

  • status changed from new to closed
  • resolution set to worksforme
  • pending unset
  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.

Add/Change #517 (Lighttpd doesn't clean up its fastcgi socket file when shutdown)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.