FCGI hanging w/ lighttpd and RoR 1.0 (need to kill -9)


#1

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


#2

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-softly-keeping-
dispatchers-alive
http://jamis.jamisbuck.org/articles/2006/02/11/tip-textdrive-and-
lighttpd


_Deirdre http://deirdre.net


#3

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 B.

On 2/17/06, jennyw jennyw removed_email_address@domain.invalid wrote:

fix this problem?


Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

Robert B.
http://www.robertbazinet.com


#4

Deirdre Saoirse M. 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-softly-keeping-
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-textdrive-and-
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


#5

Robert B. 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


#6

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


#7

Ray B. 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


#8

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 removed_email_address@domain.invalid wrote:

everything over to lighttpd, which would be no small task.
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

Robert B.
http://www.robertbazinet.com