fist_of_fury icon indicating copy to clipboard operation
fist_of_fury copied to clipboard

Is there any issues with Passenger?

Open MarcosCunhaLima opened this issue 10 years ago • 3 comments

Apache/Passenger seems to ignore fist_of_fury initialization code and nothing runs at all.

MarcosCunhaLima avatar Feb 18 '15 19:02 MarcosCunhaLima

Sorry to just get to this.

Is this possibly related to https://github.com/facto/fist_of_fury/issues/2?

joshrieken avatar Mar 24 '15 14:03 joshrieken

I don't know. I had to give up and now use whenever. It's a shame as in development mode (using Mongrel) it works flawlessly. I couldn't make it work with Passenger/Apache.

MarcosCunhaLima avatar Mar 24 '15 14:03 MarcosCunhaLima

Had the same issue. It appears that generated config/initializers/fist_of_fury.rb is not executed under passenger since Rails::Server is not defined. After reading http://stackoverflow.com/questions/12088025/detect-if-application-was-started-as-http-server-or-not-rake-task-rconsole-etc I've updated my initializer to -if defined?(Rails::Server) +if defined?(Rails::Server) or defined?(::PhusionPassenger) it started working. (but won't under some other servers, see stackoverflow link)

I also had to pass PassengerPreStart option in Apache config otherwise app is not initialized until first request, see https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerPreStart But then it gets killed in 5 minutes regardless of PassengerMinInstances and PassengerPoolIdleTime values. So finally dropped this module as well :(

0x0badc0de avatar Jul 04 '15 20:07 0x0badc0de