Libevent error 'Bad File Descriptor'

Russo, Richard russor@msoe.edu
Wed, 22 Oct 2003 20:40:37 -0700


On 22 Oct 2003 at 14:59, Sara Sioux wrote:

> Thanks for the prompt responses!  Sorry if my questions are a little
> low-brow, I'm not so great at system administration yet.  :)
Don't worry about it.

> 
> What are the drawbacks to running memcached in the background, instead
> of as a daemon?
> 
The drawback to running it in the background, as opposed to as a 
daemon, is that it's more complicated to start it up; You have to use 
something like nohup memcached &, instead of memcached -d.

(not a big difference :)


> Sara
> 
> -----Original Message-----
> From: Brion Vibber [mailto:brion@pobox.com] 
> Sent: Wednesday, October 22, 2003 2:53 PM
> To: Sara Sioux; memcached@lists.danga.com
> Subject: Re: Libevent error 'Bad File Descriptor'
> 
> 
> On Wednesday, Oct 22, 2003, at 14:37 US/Pacific, Sara Sioux wrote:
> > memcached -vv -d -m 512 -l 10.0.0.100 -p 1337
> >
> > It returns immediately with:
> >
> > <3 server listening
> > memcached: kevent: Bad file descriptor
> [snip]
> > I'm attempting to install this on a FreeBSD 5.0-RELEASE-p4 system. Any
> 
> > help and suggestions would be HUGELY appreciated.
> 
> This seems to be related to how the open file descriptors get treated 
> by the fork to a background process. I posted a workaround which seems 
> to work on FreeBSD 5.1-RELEASE yesterday, by forking before doing 
> anything substantive:
> http://lists.danga.com/pipermail/memcached/2003-October/000304.html
> 
> Alternatively, you can just run it in the background without the -d 
> option and it should work fine.
> 
> -- brion vibber (brion @ pobox.com)