Forum: Ruby on Rails FCGI hanging w/ lighttpd and RoR 1.0 (need to kill -9)

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.
114a64bf4e0cb600120f348b6447c258?d=identicon&s=25 Jennyw Jennyw (jennyw)
on 2006-02-17 19:16
Hi, everyone,

I'm currently running a Rails 1.0 project using lighttpd-1.4.9 behind
Apache 2 on RHEL 3. My fcgi process (I'm only using one right now)
always hangs after some time, which is something I haven't experienced
before (e.g., I've run this same app. on a TextDrive account and it
works fine there).

So ... any ideas on what could be causing this? Or, better yet, how to
fix this problem?

I've done some searching, and saw that some people have some problems,
but either their setups are different from what I'm using, or the info
might be outdated (pre-RoR 1.0). I saw that some people are fixing this
problem by having the processes killed regularly, but I'm not sure
issuing kill -9 every few hours is a good idea.

Thanks!

Jen
5c0f4e71d9d0b71b8b60a2693df1571a?d=identicon&s=25 Deirdre Saoirse Moen (Guest)
on 2006-02-17 21:39
(Received via mailing list)
On Feb 17, 2006, at 10:16 AM, jennyw jennyw wrote:

> I'm currently running a Rails 1.0 project using lighttpd-1.4.9 behind
> Apache 2 on RHEL 3. My fcgi process (I'm only using one right now)
> always hangs after some time, which is something I haven't experienced
> before (e.g., I've run this same app. on a TextDrive account and it
> works fine there).

I've had problems with 1.4.9 that I haven't had with 1.4.8 and
several people I know had rolled back to the prior version because of
several problems.

Are you having lighttpd spawn the fcgi or are you using the spawner
within rails?

http://poocs.net/articles/2006/02/14/killing-me-so...
dispatchers-alive
http://jamis.jamisbuck.org/articles/2006/02/11/tip...
lighttpd

--
_Deirdre                                             http://deirdre.net
75d620852fc7691a0a3a86c336055e7d?d=identicon&s=25 Robert Bazinet (Guest)
on 2006-02-17 21:54
(Received via mailing list)
Sorry to ask a question here.

I am pretty new to Linux web servers and am in the process of writing my
first Rails app.  I have seen mention of using Apache in front of
lighttpd.
My question is why?  Can't lighttpd just be used by itself?  Trying to
figure out the purpose/advantage of this configuration.

If someone has a website link that explains this configuration I would
appreciate it.

Thank you,
      Rob Bazinet



On 2/17/06, jennyw jennyw <jennyw@dangerousideas.com> wrote:
> fix this problem?
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



--

Robert Bazinet
http://www.robertbazinet.com
114a64bf4e0cb600120f348b6447c258?d=identicon&s=25 Jennyw Jennyw (jennyw)
on 2006-02-17 23:19
Deirdre Saoirse Moen wrote:
> On Feb 17, 2006, at 10:16 AM, jennyw jennyw wrote:
>
> I've had problems with 1.4.9 that I haven't had with 1.4.8 and
> several people I know had rolled back to the prior version because of
> several problems.

Maybe I'll try that.

> Are you having lighttpd spawn the fcgi or are you using the spawner
> within rails?

Using Lighttpd to spawn.  The weird thing is that restarting lighttpd
doesn't fix the problem ... you have to kill -9 the process (you can do
this without restarting lighttpd and it works, too).

> http://poocs.net/articles/2006/02/14/killing-me-so...
> dispatchers-alive

Unfotunately, this is one of those articles that doesn't seem to have a
definitive answer -- just a description of a similar problem.

> http://jamis.jamisbuck.org/articles/2006/02/11/tip...
> lighttpd

I'll try using this method and seeing what happens. Unfortunately, the
hanging doesn't usually happen until after a day has passed (and I'm not
even sure it's that consistent), so it'll be a while before I figure out
whether this makes a difference.

I'd be happy to hear any additional information or ideas!

Thanks!

Jen
114a64bf4e0cb600120f348b6447c258?d=identicon&s=25 Jennyw Jennyw (jennyw)
on 2006-02-17 23:22
Robert Bazinet wrote:
> My question is why?  Can't lighttpd just be used by itself?  Trying to
> figure out the purpose/advantage of this configuration.

In this case, there are a bunch of Web sites running in Apache right. On
one of the sites, we want to replace a certain path with a Rails
application. The easiest thing is to setup lighttpd and use mod_rewrite
so that when someone goes to http://example.com/rails-app/ Apache
proxies the lighttpd application.  The alternative would be to convert
everything over to lighttpd, which would be no small task.

If the only thing we were running were the RoR app., then we might just
run lighttpd without Apache.

Jen
E28c35323f624b8b9ed8712e25105454?d=identicon&s=25 Ray Baxter (Guest)
on 2006-02-18 05:55
(Received via mailing list)
jennyw jennyw wrote:
>
> I've done some searching, and saw that some people have some problems,
> but either their setups are different from what I'm using, or the info
> might be outdated (pre-RoR 1.0). I saw that some people are fixing this
> problem by having the processes killed regularly, but I'm not sure
> issuing kill -9 every few hours is a good idea.
>

Given that you didn't see this before, I'd guess it is something OS
specific. I would look a 1) automatic restarts of Apache and 2)
automatic log rotation.

How much traffic do you get on this site? If it is a low traffic site,
you might be able to narrow the time or frequency down by regularly
pinging a dynamic page on your site at regular intervals.

Ray
75d620852fc7691a0a3a86c336055e7d?d=identicon&s=25 Robert Bazinet (Guest)
on 2006-02-18 06:01
(Received via mailing list)
Thank you for the reply.  I understand now.  I am a .NET (no rock
throwing
please) and am used to IIS.  I am just getting into RoR and trying to
pick
up all this new/old technology.

-Rob


On 2/17/06, jennyw jennyw <jennyw@dangerousideas.com> wrote:
> everything over to lighttpd, which would be no small task.
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



--

Robert Bazinet
http://www.robertbazinet.com
114a64bf4e0cb600120f348b6447c258?d=identicon&s=25 Jennyw Jennyw (jennyw)
on 2006-02-18 08:04
Ray Baxter wrote:
> jennyw jennyw wrote:
>
> Given that you didn't see this before, I'd guess it is something OS
> specific. I would look a 1) automatic restarts of Apache and 2)
> automatic log rotation.

It's something I haven't seen before on other machines, but it's been
this way since the beginning (which was recent) on this machine. I don't
manage it, I'm just trying to install RoR on it.

Apache isn't automatically being restarted, and since Apache is only
proxying lighttpd, I don't think anything that Apache does should affect
things. Or is there some sort of indirect effect on the system that
you're thinking of?

Also, I'm not sure what you mean by log rotation. Actually, I know what
log rotation is, but I'm not sure how that would affect an fcgi process.

> How much traffic do you get on this site? If it is a low traffic site,
> you might be able to narrow the time or frequency down by regularly
> pinging a dynamic page on your site at regular intervals.

The site is being staged -- no public access, so the volume is super
low. And it still hangs.

Jen
This topic is locked and can not be replied to.