Re: Child dying with "Too many open files"

2008-02-28 Thread Michael S. Fischer
I can't help but wonder if you'd set it too high.  What happens when
you set NFILES and fs.file-max both to 131072?  I've tested that as a
known good value.

--Michael

On Thu, Feb 28, 2008 at 2:58 PM, Andrew Knapp <[EMAIL PROTECTED]> wrote:
> Yup, it is. Here's some output:
>
>  $ ps auxwww | grep varnish
>  root 12036  0.0  0.0  27704   648 ?Ss   14:54   0:00
>  /usr/sbin/varnishd -a :80 -f /etc/varnish/photo.vcl -T :6082
>
> -t 120 -w 10,700,30 -s file,/c01/varnish/varnish_storage.bin,12G -u
>  varnish -g varnish -P /var/run/varnish.pid
>  varnish  12037  1.2  0.4 13119108 39936 ?  Sl   14:54   0:00
>  /usr/sbin/varnishd -a :80 -f /etc/varnish/photo.vcl -T :6082
>
> -t 120 -w 10,700,30 -s file,/c01/varnish/varnish_storage.bin,12G -u
>  varnish -g varnish -P /var/run/varnish.pid
>
>  -Andy
>
>
>  > -Original Message-
>  > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
>  > Of Michael S. Fischer
>
>
> > Sent: Thursday, February 28, 2008 1:57 PM
>  > To: Andrew Knapp
>  > Cc: varnish-misc@projects.linpro.no
>  > Subject: Re: Child dying with "Too many open files"
>  >
>  > Is varnishd being started as root?  (even if it drops privileges
>  > later) Only root can have > 1024 file descriptors open, to my
>  > knowledge.
>  >
>  > --Michael
>  >
>  > On Thu, Feb 28, 2008 at 11:48 AM, Andrew Knapp <[EMAIL PROTECTED]>
>  > wrote:
>  > > Didn't really get a answer to this, so I'm trying again.
>  > >
>  > >  I've done some testing with the NFILES variable, and I keep getting
>  > the
>  > >  same error as before ("Too many open files"). I've also verified
>  > that
>  > >  the limit is actually being applied by putting a ulimit -a in the
>  > >  /etc/init.d/varnish script.
>  > >
>  > >  Anyone have any ideas? I'm running the 1.1.2-5 rpms from sf.net on
>  > >  Centos 5.1.
>  > >
>  > >  Thanks,
>  > >  Andy
>  > >
>  > >
>  > >  > -Original Message-
>  > >  > From: [EMAIL PROTECTED] [mailto:varnish-
>  > misc-
>  > >  > [EMAIL PROTECTED] On Behalf Of Andrew Knapp
>  > >
>  > > > Sent: Wednesday, February 20, 2008 5:52 PM
>  > >  > To: Michael S. Fischer
>  > >  > Cc: varnish-misc@projects.linpro.no
>  > >
>  > >
>  > > > Subject: RE: Child dying with "Too many open files"
>  > >  >
>  > >  > Here's the output:
>  > >  >
>  > >  > $ sysctl fs.file-max
>  > >  > fs.file-max = 767606
>  > >  >
>  > >  > > -Original Message-
>  > >  > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>  > >  > Behalf
>  > >  > > Of Michael S. Fischer
>  > >  > > Sent: Wednesday, February 20, 2008 5:48 PM
>  > >  > > To: Andrew Knapp
>  > >  > > Cc: varnish-misc@projects.linpro.no
>  > >  > > Subject: Re: Child dying with "Too many open files"
>  > >  > >
>  > >  > > Does 'sysctl fs.file-max' say?  It should be >= the ulimit.
>  > >  > >
>  > >  > > --Michael
>  > >  > >
>  > >  > > On Wed, Feb 20, 2008 at 4:04 PM, Andrew Knapp
>  <[EMAIL PROTECTED]>
>  > >  > wrote:
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > Hello,
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > I'm getting this error when running varnishd:
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > >>
>  > >  > > >
>  > >  > > > Child said (2, 15369): <  > >  cache_pool.c
>  > >  > > line
>  > >  > > > 217:
>  > >  > > >
>  > >  > > >   Condition((pipe(w->pipe)) == 0) not true.
>  > >  > > >
>  > >  > > >   errno = 24 (Too many open files)
>  > >  > > >
>  > >  > > > >>
>  > >  > > >
>  > >  > > > Cache child died pid=15369 status=0x6
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > uname -a:
>  > >  > > >
>  > >  > > > Linux  2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:55
>  > EST
>  > >  > > 2007
>  > >  > > > x86_64 x86_64 x86_64 GNU/Linux
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > command used to start varnish:
>  > >  > > >
>  > >  > > > /usr/sbin/varnishd -d -d -a :80 -f /etc/varnish/photo.vcl -T
>  > >  > > > :6082 -t 120 -w 10,700,30 -s
>  > >  > > > file,/c01/varnish/varnish_storage.bin,12G -u varnish -g
>  > varnish -P
>  > >  > > > /var/run/varnish.pid
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > I have NFILES=27 set in /etc/sysconfig/varnish. Do I just
>  > need
>  > >  > to
>  > >  > > up
>  > >  > > > that value?
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > Thanks,
>  > >  > > >
>  > >  > > > Andy
>  > >  > > > ___
>  > >  > > >  varnish-misc mailing list
>  > >  > > >  varnish-misc@projects.linpro.no
>  > >  > > >  http://projects.linpro.no/mailman/listinfo/varnish-misc
>  > >  > > >
>  > >  > > >
>  > >  > ___
>  > >  > varnish-misc mailing list
>  > >  > varnish-misc@projects.linpro.no
>  > >  > http://projects.linpro.no/mailman/listinfo/varnish-misc
>  > >  ___
>  > >  varnish-misc mailing list
>  > >  varnish-misc@projects.linpro.no
>  > >  http://projects.linpro.no/mailman/listinfo/va

RE: Child dying with "Too many open files"

2008-02-28 Thread Andrew Knapp
Yup, it is. Here's some output:

$ ps auxwww | grep varnish
root 12036  0.0  0.0  27704   648 ?Ss   14:54   0:00
/usr/sbin/varnishd -a :80 -f /etc/varnish/photo.vcl -T :6082
-t 120 -w 10,700,30 -s file,/c01/varnish/varnish_storage.bin,12G -u
varnish -g varnish -P /var/run/varnish.pid
varnish  12037  1.2  0.4 13119108 39936 ?  Sl   14:54   0:00
/usr/sbin/varnishd -a :80 -f /etc/varnish/photo.vcl -T :6082
-t 120 -w 10,700,30 -s file,/c01/varnish/varnish_storage.bin,12G -u
varnish -g varnish -P /var/run/varnish.pid

-Andy

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Michael S. Fischer
> Sent: Thursday, February 28, 2008 1:57 PM
> To: Andrew Knapp
> Cc: varnish-misc@projects.linpro.no
> Subject: Re: Child dying with "Too many open files"
> 
> Is varnishd being started as root?  (even if it drops privileges
> later) Only root can have > 1024 file descriptors open, to my
> knowledge.
> 
> --Michael
> 
> On Thu, Feb 28, 2008 at 11:48 AM, Andrew Knapp <[EMAIL PROTECTED]>
> wrote:
> > Didn't really get a answer to this, so I'm trying again.
> >
> >  I've done some testing with the NFILES variable, and I keep getting
> the
> >  same error as before ("Too many open files"). I've also verified
> that
> >  the limit is actually being applied by putting a ulimit -a in the
> >  /etc/init.d/varnish script.
> >
> >  Anyone have any ideas? I'm running the 1.1.2-5 rpms from sf.net on
> >  Centos 5.1.
> >
> >  Thanks,
> >  Andy
> >
> >
> >  > -Original Message-
> >  > From: [EMAIL PROTECTED] [mailto:varnish-
> misc-
> >  > [EMAIL PROTECTED] On Behalf Of Andrew Knapp
> >
> > > Sent: Wednesday, February 20, 2008 5:52 PM
> >  > To: Michael S. Fischer
> >  > Cc: varnish-misc@projects.linpro.no
> >
> >
> > > Subject: RE: Child dying with "Too many open files"
> >  >
> >  > Here's the output:
> >  >
> >  > $ sysctl fs.file-max
> >  > fs.file-max = 767606
> >  >
> >  > > -Original Message-
> >  > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> >  > Behalf
> >  > > Of Michael S. Fischer
> >  > > Sent: Wednesday, February 20, 2008 5:48 PM
> >  > > To: Andrew Knapp
> >  > > Cc: varnish-misc@projects.linpro.no
> >  > > Subject: Re: Child dying with "Too many open files"
> >  > >
> >  > > Does 'sysctl fs.file-max' say?  It should be >= the ulimit.
> >  > >
> >  > > --Michael
> >  > >
> >  > > On Wed, Feb 20, 2008 at 4:04 PM, Andrew Knapp
<[EMAIL PROTECTED]>
> >  > wrote:
> >  > > >
> >  > > >
> >  > > >
> >  > > >
> >  > > > Hello,
> >  > > >
> >  > > >
> >  > > >
> >  > > > I'm getting this error when running varnishd:
> >  > > >
> >  > > >
> >  > > >
> >  > > > >>
> >  > > >
> >  > > > Child said (2, 15369): < >  cache_pool.c
> >  > > line
> >  > > > 217:
> >  > > >
> >  > > >   Condition((pipe(w->pipe)) == 0) not true.
> >  > > >
> >  > > >   errno = 24 (Too many open files)
> >  > > >
> >  > > > >>
> >  > > >
> >  > > > Cache child died pid=15369 status=0x6
> >  > > >
> >  > > >
> >  > > >
> >  > > > uname -a:
> >  > > >
> >  > > > Linux  2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:55
> EST
> >  > > 2007
> >  > > > x86_64 x86_64 x86_64 GNU/Linux
> >  > > >
> >  > > >
> >  > > >
> >  > > > command used to start varnish:
> >  > > >
> >  > > > /usr/sbin/varnishd -d -d -a :80 -f /etc/varnish/photo.vcl -T
> >  > > > :6082 -t 120 -w 10,700,30 -s
> >  > > > file,/c01/varnish/varnish_storage.bin,12G -u varnish -g
> varnish -P
> >  > > > /var/run/varnish.pid
> >  > > >
> >  > > >
> >  > > >
> >  > > > I have NFILES=27 set in /etc/sysconfig/varnish. Do I just
> need
> >  > to
> >  > > up
> >  > > > that value?
> >  > > >
> >  > > >
> >  > > >
> >  > > > Thanks,
> >  > > >
> >  > > > Andy
> >  > > > ___
> >  > > >  varnish-misc mailing list
> >  > > >  varnish-misc@projects.linpro.no
> >  > > >  http://projects.linpro.no/mailman/listinfo/varnish-misc
> >  > > >
> >  > > >
> >  > ___
> >  > varnish-misc mailing list
> >  > varnish-misc@projects.linpro.no
> >  > http://projects.linpro.no/mailman/listinfo/varnish-misc
> >  ___
> >  varnish-misc mailing list
> >  varnish-misc@projects.linpro.no
> >  http://projects.linpro.no/mailman/listinfo/varnish-misc
> >
> >
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Child dying with "Too many open files"

2008-02-28 Thread Michael S. Fischer
Is varnishd being started as root?  (even if it drops privileges
later) Only root can have > 1024 file descriptors open, to my
knowledge.

--Michael

On Thu, Feb 28, 2008 at 11:48 AM, Andrew Knapp <[EMAIL PROTECTED]> wrote:
> Didn't really get a answer to this, so I'm trying again.
>
>  I've done some testing with the NFILES variable, and I keep getting the
>  same error as before ("Too many open files"). I've also verified that
>  the limit is actually being applied by putting a ulimit -a in the
>  /etc/init.d/varnish script.
>
>  Anyone have any ideas? I'm running the 1.1.2-5 rpms from sf.net on
>  Centos 5.1.
>
>  Thanks,
>  Andy
>
>
>  > -Original Message-
>  > From: [EMAIL PROTECTED] [mailto:varnish-misc-
>  > [EMAIL PROTECTED] On Behalf Of Andrew Knapp
>
> > Sent: Wednesday, February 20, 2008 5:52 PM
>  > To: Michael S. Fischer
>  > Cc: varnish-misc@projects.linpro.no
>
>
> > Subject: RE: Child dying with "Too many open files"
>  >
>  > Here's the output:
>  >
>  > $ sysctl fs.file-max
>  > fs.file-max = 767606
>  >
>  > > -Original Message-
>  > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>  > Behalf
>  > > Of Michael S. Fischer
>  > > Sent: Wednesday, February 20, 2008 5:48 PM
>  > > To: Andrew Knapp
>  > > Cc: varnish-misc@projects.linpro.no
>  > > Subject: Re: Child dying with "Too many open files"
>  > >
>  > > Does 'sysctl fs.file-max' say?  It should be >= the ulimit.
>  > >
>  > > --Michael
>  > >
>  > > On Wed, Feb 20, 2008 at 4:04 PM, Andrew Knapp <[EMAIL PROTECTED]>
>  > wrote:
>  > > >
>  > > >
>  > > >
>  > > >
>  > > > Hello,
>  > > >
>  > > >
>  > > >
>  > > > I'm getting this error when running varnishd:
>  > > >
>  > > >
>  > > >
>  > > > >>
>  > > >
>  > > > Child said (2, 15369): <  cache_pool.c
>  > > line
>  > > > 217:
>  > > >
>  > > >   Condition((pipe(w->pipe)) == 0) not true.
>  > > >
>  > > >   errno = 24 (Too many open files)
>  > > >
>  > > > >>
>  > > >
>  > > > Cache child died pid=15369 status=0x6
>  > > >
>  > > >
>  > > >
>  > > > uname -a:
>  > > >
>  > > > Linux  2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:55 EST
>  > > 2007
>  > > > x86_64 x86_64 x86_64 GNU/Linux
>  > > >
>  > > >
>  > > >
>  > > > command used to start varnish:
>  > > >
>  > > > /usr/sbin/varnishd -d -d -a :80 -f /etc/varnish/photo.vcl -T
>  > > > :6082 -t 120 -w 10,700,30 -s
>  > > > file,/c01/varnish/varnish_storage.bin,12G -u varnish -g varnish -P
>  > > > /var/run/varnish.pid
>  > > >
>  > > >
>  > > >
>  > > > I have NFILES=27 set in /etc/sysconfig/varnish. Do I just need
>  > to
>  > > up
>  > > > that value?
>  > > >
>  > > >
>  > > >
>  > > > Thanks,
>  > > >
>  > > > Andy
>  > > > ___
>  > > >  varnish-misc mailing list
>  > > >  varnish-misc@projects.linpro.no
>  > > >  http://projects.linpro.no/mailman/listinfo/varnish-misc
>  > > >
>  > > >
>  > ___
>  > varnish-misc mailing list
>  > varnish-misc@projects.linpro.no
>  > http://projects.linpro.no/mailman/listinfo/varnish-misc
>  ___
>  varnish-misc mailing list
>  varnish-misc@projects.linpro.no
>  http://projects.linpro.no/mailman/listinfo/varnish-misc
>
>
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


RE: Child dying with "Too many open files"

2008-02-28 Thread Andrew Knapp
Didn't really get a answer to this, so I'm trying again.

I've done some testing with the NFILES variable, and I keep getting the
same error as before ("Too many open files"). I've also verified that
the limit is actually being applied by putting a ulimit -a in the
/etc/init.d/varnish script.

Anyone have any ideas? I'm running the 1.1.2-5 rpms from sf.net on
Centos 5.1.

Thanks,
Andy

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:varnish-misc-
> [EMAIL PROTECTED] On Behalf Of Andrew Knapp
> Sent: Wednesday, February 20, 2008 5:52 PM
> To: Michael S. Fischer
> Cc: varnish-misc@projects.linpro.no
> Subject: RE: Child dying with "Too many open files"
> 
> Here's the output:
> 
> $ sysctl fs.file-max
> fs.file-max = 767606
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf
> > Of Michael S. Fischer
> > Sent: Wednesday, February 20, 2008 5:48 PM
> > To: Andrew Knapp
> > Cc: varnish-misc@projects.linpro.no
> > Subject: Re: Child dying with "Too many open files"
> >
> > Does 'sysctl fs.file-max' say?  It should be >= the ulimit.
> >
> > --Michael
> >
> > On Wed, Feb 20, 2008 at 4:04 PM, Andrew Knapp <[EMAIL PROTECTED]>
> wrote:
> > >
> > >
> > >
> > >
> > > Hello,
> > >
> > >
> > >
> > > I'm getting this error when running varnishd:
> > >
> > >
> > >
> > > >>
> > >
> > > Child said (2, 15369): < > line
> > > 217:
> > >
> > >   Condition((pipe(w->pipe)) == 0) not true.
> > >
> > >   errno = 24 (Too many open files)
> > >
> > > >>
> > >
> > > Cache child died pid=15369 status=0x6
> > >
> > >
> > >
> > > uname -a:
> > >
> > > Linux  2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:55 EST
> > 2007
> > > x86_64 x86_64 x86_64 GNU/Linux
> > >
> > >
> > >
> > > command used to start varnish:
> > >
> > > /usr/sbin/varnishd -d -d -a :80 -f /etc/varnish/photo.vcl -T
> > > :6082 -t 120 -w 10,700,30 -s
> > > file,/c01/varnish/varnish_storage.bin,12G -u varnish -g varnish -P
> > > /var/run/varnish.pid
> > >
> > >
> > >
> > > I have NFILES=27 set in /etc/sysconfig/varnish. Do I just need
> to
> > up
> > > that value?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Andy
> > > ___
> > >  varnish-misc mailing list
> > >  varnish-misc@projects.linpro.no
> > >  http://projects.linpro.no/mailman/listinfo/varnish-misc
> > >
> > >
> ___
> varnish-misc mailing list
> varnish-misc@projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish-misc Digest, Vol 23, Issue 23

2008-02-28 Thread Anders Vännman
Jag har semester. Maila till [EMAIL PROTECTED] eller ring  090-70 84 70 om det
gäller något supportärende.

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


RE: Re: Deliver ReqEnd in http header

2008-02-28 Thread Erik
Okey... I started to add some things that looked ok to me. But I have a feeling 
that I cannot use "string". Here is what I did:

On line 551 in vcc_fixed_token.c:
+ vsb_cat(sb, "string VRT_r_reqend(const struct sess *);\n");

On line 208-211 in vcc_gen_obj.tcl:
+ { reqend  RO STRING
+   {deliver}
+   "const struct sess *"
+ }

On line 224-230 in vcc_obj.c:
+ { "reqend", STRING, 15,
+"VRT_r_now(sp)",
+NULL,
+V_RO,
+0,
+VCL_MET_DELIVER
+},

On line 532-539 in cache_vrt.c:
+ /* REQEND */
+ string
+ VRT_r_reqend(const struct sess *sp)
+ {
+   (void)sp;
+   return ("Test");
+ }

Seems a little bit easy to be allright :P

Any tip? ("stop wasting your time in a code you cant understand" ;)

/ Erik

Original Message ---

It's not too terrible, but not entirely simple either.

You need to add an VCL object (see the lib/libvcl/*.tcl files, then
add the necessary stuff in the .c files)

Then you need to at the VCL RunTime ("VRT") functions in cache_vrt.c.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc