The fastcgi crash after few hours

I have this configuration on my server

  • Windows 2000 server
  • Apache 2.0.55
  • MySQL 5.x
  • Rails 1.0

For the moment I have a rails app that run on Apache with fastcgi. After
some hours i use the application the fastcgi go down and so the web app
is so slow (with cgi).
The error in RAILS_ROOT/log/fastcgi.crash.log is:

[23/Mar/2006:09:11:23 :: 5668] Ignoring unsupported signal USR1.
[23/Mar/2006:09:11:23 :: 5668] Ignoring unsupported signal USR2.
[23/Mar/2006:09:11:23 :: 5668] Ignoring unsupported signal HUP.
[23/Mar/2006:09:11:23 :: 5668] starting

Thanks so much for the time
–Andrea R.

Not enough info for me to tell right off the bat, but could you please
paste
the piece of your Apache configuration for your Rails application? I’ve
got
the same configuration running for over five weeks without a problem.

Brian H. wrote:

Not enough info for me to tell right off the bat, but could you please
paste
the piece of your Apache configuration for your Rails application? I’ve
got
the same configuration running for over five weeks without a problem.

The configuration in http.conf is this for my application.
Then the application for the moment is in the development enviroment.


Alias /fatturails/ “C:/Programmi/Apache
Group/Apache2/htdocs/fatturails/public/”

<Directory “C:/Programmi/Apache Group/Apache2/htdocs/fatturails/public”>
AddHandler fastcgi-script .fcgi
Options +ExecCGI
AllowOverride All
Allow from all
Order Allow,deny

FastCgiServer “C:/Programmi/Apache
Group/Apache2/htdocs/fatturails/public/dispatch.fcgi” -processes 1

I have also found this errors in the log error of Apache. Could be this
the reason that degrade the speed of Apache?


[Thu Mar 23 14:23:15 2006] [error] [client 192.168.0.186] FastCGI:
server “C:/Programmi/Apache
Group/Apache2/htdocs/fatturails/public/dispatch.fcgi” stderr:
C:/Programmi/Apache
Group/Apache2/htdocs/fatturails/public/…/config/…/app/controllers/invoice_controller.rb:77:
warning: don’t put space before argument parentheses, referer:
http://acserver:82/fatturails/invoice/show

[Thu Mar 23 14:50:07 2006] [error] [client 192.168.0.186] File does not
exist: C:/Programmi/Apache Group/Apache2/htdocs/images, referer:
http://acserver:82/fatturails/client

Thanks so much.
–Andrea

Sure…
You’re not running in Production mode (at least, not according to your
configuration file).

Try this and see if it clears matters up. fcgi does not run well in
development mode (default unless you altered environment.rb to force
production mode).

FastCgiServer “C:/Programmi/Apache
Group/Apache2/htdocs/fatturails/public/dispatch.fcgi” -idle-timeout 120
-initial-env RAILS_ENV=production -processes 2

(make sure that’s on one line in your config file!!!)

Brian H. wrote:

Sure…
You’re not running in Production mode (at least, not according to your
configuration file).

Try this and see if it clears matters up. fcgi does not run well in
development mode (default unless you altered environment.rb to force
production mode).

FastCgiServer “C:/Programmi/Apache
Group/Apache2/htdocs/fatturails/public/dispatch.fcgi” -idle-timeout 120
-initial-env RAILS_ENV=production -processes 2

(make sure that’s on one line in your config file!!!)

Thanks so much…
I will try tomorrow your code.

A last question. When I change to Production mode the http.conf file, I
must change also the inviroment in the rails application or no?

Sorry for the stupid question, but i wont try to understand if the two
definition are independent.

–Andrea R…

No you should only need to set the environment in httpd.conf.
You WILL have to restart Apache if you want to change your models or
controllers when you run in Production mode (but that’s usally fine…
production mode is meant to be stable, unchaning.)

Brian H. wrote:

No you should only need to set the environment in httpd.conf.
You WILL have to restart Apache if you want to change your models or
controllers when you run in Production mode (but that’s usally fine…
production mode is meant to be stable, unchaning.)

Thanks so much Brian.
–Andrea R.

Reis wrote:

Brian H. wrote:

No you should only need to set the environment in httpd.conf.
You WILL have to restart Apache if you want to change your models or
controllers when you run in Production mode (but that’s usally fine…
production mode is meant to be stable, unchaning.)

Thanks so much Brian.
–Andrea R.

A last question.
Now i use this line of code for the configuration


FastCgiServer “C:/Programmi/Apache
Group/Apache2/htdocs/fatturails/public/dispatch.fcgi” -idle-timeout 120
-initial-env RAILS_ENV=production -processes 2

But the application reload automaticaly the changes. Is the motivation
in the env setted as development into the rails application?

Thanks
–Andrea R…

You should be using webrick for development purposes, not FastCGI, as
there
are memory leaks and other problems.