# Rails+Mongrel+Lighthttpd: Ruby-Sendfile Problem

**URL:** <https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711>\
**Category:** Rails\
**Created:** [July 17, 2006, 6:16pm UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711 "2006-07-17T18:16:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feurio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Post date:** [July 17, 2006, 6:16pm UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711/1 "2006-07-17T18:16:43Z")

</div>

Hello,

I have a working mongrel cluster and want to use Lighty as the frontend  
webserver. I want ligthttpd to deliver the static content.  
So I did

gem install sendfile --remote

Everything installed.

But if I run the tests like

gem check sendfile --test --debug

i get the following error message:

Exception `Errno::ENOSYS’ at ./test/test\_sendfile.rb:75 - Function not  
implemented - sendfile

If I use lighttpd with mongrel and sendfile I do have similary error  
messages in my mongrel log.

Does anybody know what is wrong?

Cheers, Feurio

My configuration is:

Debian Sarge  
Rails 1.1.2  
mongrel (0.3.13.3)  
mongrel\_cluster (0.2.0)  
sendfile (0.9.2)  
lighttpd-1.4.11

---

<div class="post-metadata">

**Author:** ![Feurio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Post date:** [July 17, 2006, 7:32pm UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711/2 "2006-07-17T19:32:26Z")

</div>

On Mon, 2006-07-17 at 18:16 +0200, Feurio wrote:

> Hello,
> 
> Exception `Errno::ENOSYS’ at ./test/test\_sendfile.rb:75 - Function not  
> implemented - sendfile

Means that your OS don’t have it, which I don’t quite get since you’re  
running Linux.

> My configuration is:
> 
> Debian Sarge

^^^ Nobody except debian people knows what this means. Which version of  
Linux is it? Can you do uname -a and send me that?

–  
Zed A. Shaw

> **[Zed A. shaw](https://zedshaw.com/)**
>
> Personal essays and writings by Zed A. Shaw.

[http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)  
[http://www.railsmachine.com/](http://www.railsmachine.com/) – Need Mongrel support?

---

<div class="post-metadata">

**Author:** ![Feurio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Post date:** [July 17, 2006, 9:07pm UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711/3 "2006-07-17T21:07:48Z")

</div>

the uname -a output is

Linux [v330.v330.vanager.de](http://v330.v330.vanager.de) 2.4.20-021stab028.19.777-enterprise #1 SMP  
Wed Oct 19 13:05:01 MSD 2005 i686 GNU/Linux

I donÂ´t understand the missing filesend support, too.

---

<div class="post-metadata">

**Author:** ![Feurio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Post date:** [July 17, 2006, 11:33pm UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711/4 "2006-07-17T23:33:55Z")

</div>

On Mon, 2006-07-17 at 21:09 +0200, Feurio wrote:

> Feurio wrote:
> 
> > the uname -a output is
> > 
> > Linux [v330.v330.vanager.de](http://v330.v330.vanager.de) 2.4.20-021stab028.19.777-enterprise #1 SMP  
> > Wed Oct 19 13:05:01 MSD 2005 i686 GNU/Linux
> > 
> > I donÂ´t understand the missing filesend support, too.
> 
> …maybe it is because this is a VPS. Could this be the reason?

No, unless debian went as far as to remove sendfile (wouldn’t surprise  
me really). I’ll have to confirm that sendfile is actually in the 2.4  
kernel.

–  
Zed A. Shaw

> **[Zed A. shaw](https://zedshaw.com/)**
>
> Personal essays and writings by Zed A. Shaw.

[http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)  
[http://www.railsmachine.com/](http://www.railsmachine.com/) – Need Mongrel support?

---

<div class="post-metadata">

**Author:** ![Feurio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Post date:** [July 17, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711/5 "2006-07-17T21:09:59Z")

</div>

Feurio wrote:

> the uname -a output is
> 
> Linux [v330.v330.vanager.de](http://v330.v330.vanager.de) 2.4.20-021stab028.19.777-enterprise #1 SMP  
> Wed Oct 19 13:05:01 MSD 2005 i686 GNU/Linux
> 
> I donÂ´t understand the missing filesend support, too.

…maybe it is because this is a VPS. Could this be the reason?

---

<div class="post-metadata">

**Author:** ![Feurio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Post date:** [July 19, 2006, 11:52am UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711/6 "2006-07-19T11:52:01Z")

</div>

Feurio wrote:

> My configuration is:
> 
> Debian Sarge  
> Rails 1.1.2  
> mongrel (0.3.13.3)  
> mongrel\_cluster (0.2.0)  
> sendfile (0.9.2)  
> lighttpd-1.4.11

looks like there could be a problem with lighttpd and debian 3.1 aka  
sarge. i looked for lighttpd and in their project-management “trac” you  
can find this:  
[http://trac.lighttpd.net/trac/ticket/328](http://trac.lighttpd.net/trac/ticket/328)  
seems like your problem could be related to this one, as they keep  
getting errors like:  
“sendfile failed: Function not implemented”  
why don’t you try one of their workarounds or another version of  
lighttpd oder kernel!?

regards  
none

---

<div class="post-metadata">

**Author:** ![Feurio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Post date:** [July 18, 2006, 11:43am UTC](https://www.ruby-forum.com/t/rails-mongrel-lighthttpd-ruby-sendfile-problem/98711/7 "2006-07-18T11:43:26Z")

</div>

Zed S. wrote:

> On Mon, 2006-07-17 at 21:09 +0200, Feurio wrote:
> 
> > Feurio wrote:
> > 
> > > the uname -a output is
> > > 
> > > Linux [v330.v330.vanager.de](http://v330.v330.vanager.de) 2.4.20-021stab028.19.777-enterprise #1 SMP  
> > > Wed Oct 19 13:05:01 MSD 2005 i686 GNU/Linux
> > > 
> > > I donÂ´t understand the missing filesend support, too.
> > 
> > …maybe it is because this is a VPS. Could this be the reason?
> 
> No, unless debian went as far as to remove sendfile (wouldn’t surprise  
> me really). I’ll have to confirm that sendfile is actually in the 2.4  
> kernel.

According to this article sendfile is definetly in the linux 2.4.x  
kernel:

[http://linux.omnipotent.net/article.php?article\_id=11706](http://linux.omnipotent.net/article.php?article_id=11706)

Until now I couldnÂ´t specific information about debian sarge & kernel &  
sendfile…

Is this functionality something you could turn on and off? Maybe it is  
just disabled with my system?

Feurio

> –  
> Zed A. Shaw  
> [http://www.zedshaw.com/](http://www.zedshaw.com/)  
> [http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)  
> [http://www.railsmachine.com/](http://www.railsmachine.com/) – Need Mongrel support?
