httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: File descriptor loss on graceful restart
Date Mon, 13 Aug 2001 21:05:36 GMT

The fix is simple in theory, but it touches a couple of files.  Just look at the
CVS diff's from last night for srclib/apr/memory/unix/apr_pools.c and 
server/listen.c.  This patch will be included in 2.0.24, and I really don't
know when that will roll, but I would like it to be this week sometime.

Ryan


On Monday 13 August 2001 13:35, Shail Bhatnagar wrote:
> Ryan, Since you have already fixed this bug, can you post
> the patch on this email thread. How far are we from 2.0.24
> and would it include this patch ?
>
> Thanks,
> Shail
>
> Ryan Bloom wrote:
> > You are likely to be losing one for each socket.  I keep meaning
> > to fix this bug.
> >
> > Ryan
> >
> > On Friday 10 August 2001 12:39, Shail Bhatnagar wrote:
> > > I put the following code fragment in
> > > server/main.c :
> > >
> > > (added code is preceeded by '+' sign)
> > >
> > >      ap_run_optional_fn_retrieve();
> > > +    {
> > > +       #include <fcntl.h>
> > > +
> > > +       int fd = open("/tmp", O_RDONLY);
> > > +
> > > +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
> > > NULL, +                    "Master httpd before ap_mpm_run() : "
> > > +                    "sbrk(0) = %x, fd count = %d\n",
> > > +                    (unsigned int)sbrk(0), fd);
> > > +       close(fd);
> > > +    }
> > >      if (ap_mpm_run(pconf, plog, server_conf)) break;
> > >
> > >
> > > When I do a graceful restart in a loop, say every 20
> > > seconds (without http traffic), I see that the master
> > > httpd looses one file descriptor per graceful restart.
> > > I say this on the basis of the ap_log_error() output -
> > > the fd count just keeps going up.
> > >
> > > Is there a  known bug ? This only happens when rotation
> > > of error and/or access log is enabled.
> > >
> > > This is httpd-2.0.16 beta code.
> > >
> > > Thanks for your time,
> > > Shail
> >
> > --
> >
> > ______________________________________________________________
> > Ryan Bloom                              rbb@apache.org
> > Covalent Technologies                   rbb@covalent.net
> > --------------------------------------------------------------

-- 

______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message