Forum: Ruby on Rails The fastcgi crash after few hours

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4f4122bc3b9999d9050f0b1a10b63251?d=identicon&s=25 Reis (Guest)
on 2006-03-23 22:57
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 Reginato
6ef8cb7cd7cd58077f0b57e4fa49a969?d=identicon&s=25 Brian Hogan (Guest)
on 2006-03-23 23:26
(Received via mailing list)
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.
4f4122bc3b9999d9050f0b1a10b63251?d=identicon&s=25 Guest (Guest)
on 2006-03-24 10:24
Brian Hogan 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
</Directory>

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
6ef8cb7cd7cd58077f0b57e4fa49a969?d=identicon&s=25 Brian Hogan (Guest)
on 2006-03-24 16:45
(Received via mailing list)
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!!!)
4f4122bc3b9999d9050f0b1a10b63251?d=identicon&s=25 Reis (Guest)
on 2006-03-24 16:57
Brian Hogan 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 Reginato.
6ef8cb7cd7cd58077f0b57e4fa49a969?d=identicon&s=25 Brian Hogan (Guest)
on 2006-03-24 18:14
(Received via mailing list)
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.)
4f4122bc3b9999d9050f0b1a10b63251?d=identicon&s=25 Reis (Guest)
on 2006-03-24 18:26
Brian Hogan 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 Reginato
4f4122bc3b9999d9050f0b1a10b63251?d=identicon&s=25 Guest (Guest)
on 2006-03-25 11:19
Reis wrote:
> Brian Hogan 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 Reginato

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 Reginato.
6ef8cb7cd7cd58077f0b57e4fa49a969?d=identicon&s=25 Brian Hogan (Guest)
on 2006-04-12 16:04
(Received via mailing list)
You should be using webrick for development purposes, not FastCGI, as
there
are memory leaks and other problems.
This topic is locked and can not be replied to.