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

**URL:** <https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789>\
**Category:** Rails\
**Created:** [February 17, 2006, 7:16pm UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789 "2006-02-17T19:16:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 17, 2006, 7:16pm UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/1 "2006-02-17T19:16:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 17, 2006, 9:39pm UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/2 "2006-02-17T21:39:24Z")

</div>

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-](http://poocs.net/articles/2006/02/14/killing-me-softly-keeping-)  
dispatchers-alive  
[http://jamis.jamisbuck.org/articles/2006/02/11/tip-textdrive-and-](http://jamis.jamisbuck.org/articles/2006/02/11/tip-textdrive-and-)  
lighttpd

–  
\_Deirdre [http://deirdre.net](http://deirdre.net)

---

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 17, 2006, 9:54pm UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/3 "2006-02-17T21:54:39Z")

</div>

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](mailto:removed_email_address@domain.invalid) wrote:

> fix this problem?
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

Robert B.  
[http://www.robertbazinet.com](http://www.robertbazinet.com)

---

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 17, 2006, 11:19pm UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/4 "2006-02-17T23:19:57Z")

</div>

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-](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-](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

---

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 17, 2006, 11:22pm UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/5 "2006-02-17T23:22:23Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 18, 2006, 5:55am UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/6 "2006-02-18T05:55:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 18, 2006, 8:04am UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/7 "2006-02-18T08:04:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jennyw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@jennyw](https://www.ruby-forum.com/u/jennyw)\
**Post date:** [February 18, 2006, 6:01am UTC](https://www.ruby-forum.com/t/fcgi-hanging-w-lighttpd-and-ror-1-0-need-to-kill-9/69789/8 "2006-02-18T06:01:11Z")

</div>

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](mailto: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](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

Robert B.  
[http://www.robertbazinet.com](http://www.robertbazinet.com)
