[Mongrel] Mongrel_Cluster PID File Creation Error.

donnie at darthik.com donnie at darthik.com
Tue Feb 20 22:19:34 EST 2007


Thank you for your development of Mongrel, great job.  :)

I am using mongrel_cluster, but I have a problem where my rails
application name includes a "." such as mydomain.com, which causes an
error when generating the PID file for mongrel.

I have attached below a diff of the current working copy in the trunk
and the changes I made to overcome this problem.  I kept your convention
of assuming the file ends with ".pid" in my changes.

Hope this helps.
Donnie Jones

svn diff
Index: init.rb
--- init.rb     (revision 519)
+++ init.rb     (working copy)
@@ -24,7 +24,7 @@
         conf = YAML.load_file(@config_file)
         @options.merge! conf if conf
-        @pid_file = @options["pid_file"].split(".")
+        @pid_file = @options["pid_file"].split(".pid")

         start_port = end_port = @only
         start_port ||=  @options["port"].to_i
@@ -34,7 +34,7 @@

       def port_pid_file(port)
-        "#{@pid_file[0]}.#{port}.#{@pid_file[1]}"
+                               "#{@pid_file}.#{port}.pid"

       def start

More information about the Mongrel-users mailing list