Re: 1.1.1 progress

2007-08-20 Thread Dag-Erling Smørgrav
Janis Putrams <[EMAIL PROTECTED]> writes:
> Child said (2, 25738): <   Condition(!isnan(w->used)) not true.
>   errno = 104 (Connection reset by peer)
>>>

See ticket #150.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Why POST methos is not work?

2007-08-20 Thread Dag-Erling Smørgrav
"Monty Ree" <[EMAIL PROTECTED]> writes:
> I have setup vcl like below, and works well except POST method.
> When I using POST Method like writing a message, the site is stops
> and trying to connect the backend server continuously.  and I have
> restarted the varnishd but the result is same.

Impossible to diagnose without logs.

> What's the problem and is there any problem at this config?

Yes:

 1) Do not ever use an existing domain name (abc.com in this case) in
documentation or sample code.  The example.com domain has been
reserved for this purpose.

 2) You've got the logic backwards.  If your site uses cookies, then
in most cases control will reach the "lookup" in the (req.request
== "GET" && req.http.cookie) clause and the rest of vcl_recv()
will have no effect.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: pass vs pipe

2007-08-20 Thread Dag-Erling Smørgrav
Ramon Navarro Bosch <[EMAIL PROTECTED]> writes:
> if (req.request != "GET" && req.request != "HEAD") {
> # Do not try to cache POST
> pass;
> }

This is wrong, pass mode can't handle POST requests (yet).

> VARNISH VERSION I USE: branch/1.1

>From when?

> the problem is on the not GET/HEAD rule :
>
> if we choose pass some people get error on POST commits ( don't respond )
>
> if we choose pipe some people get error ( it's my case ) that it
> takes a long time and finally it gave an error complaining about
> upstream.

If this happens with the latest from branches/1.1, Try applying the
patch from r1888.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: 1.1.1 progress

2007-08-20 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, Janis Putrams writes:

>Assert error in wrk_do_one(), cache_pool.c line 199:
>  Condition(!isnan(w->used)) not true.
>  errno =3D 104 (Connection reset by peer)

Try this fix:

In cache_center.c, function cnt_lookup(), before the call to SES_Charge(),
insert:

sp->wrk->used = TIM_real();

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


Re: 1.1.1 progress

2007-08-20 Thread Janis Putrams
Hi!

Tnx for advice, i increased core file size to unlimited, run in foreground and 
wait for crash.
Meanwhile encountered slave process restart that did not kill management 
process, but gave this log:

...
Cache child died pid=25094 status=0xb
Clean child
Child cleaned
start child pid 25738
Child said (2, 25738): <>
Child said (2, 25738): <>
Child said (2, 25738): used)) not true.
  errno = 104 (Connection reset by peer)
>>
Cache child died pid=25738 status=0x6
Clean child
Child cleaned
start child pid 26209
Child said (2, 26209): < Janis Putrams <[EMAIL PROTECTED]> writes:
> > I have been running varnishd from svn @Aug 16 06:17 and I managed to
> > capture master crash log.
>
> I have no idea what a "master crash log" is, but the varnish log you
> included is corrupted and doesn't tell me much, except that most of
> your traffic is piped to the backend rather than cached.  If you're
> having trouble with the management and / or worker process crashing,
> you should run varnish in the foreground (-d -d) to capture the error
> messages (most likely assertion failures), and get a backtrace.
>
> DES
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Why POST methos is not work?

2007-08-20 Thread Monty Ree
Hello, all.

I have setup vcl like below, and works well except POST method.
When I using POST Method like writing a message, the site is stops and 
trying to connect the backend server continuously.
and I have restarted the varnishd but the result is same.

What's the problem and is there any problem at this config?



backend server1 {
 set backend.host = "origin.abc.com";
 set backend.port = "80";
}


sub vcl_recv {
if (req.http.Host == "www.abc.com")
 {
 set req.backend = server1;
 set req.http.host = "origin.abc.com";

 }
   if (req.request == "POST") {
 pipe;
 }
if (req.request == "GET" && req.http.cookie) {
 lookup;
 }
if (req.http.Authenticate) {
  pipe;
}

 if (req.url ~ "\.cgi|php)$") {
  pipe;
}

  if (req.url ~ "\.(pdf|png|gif|jpg|mp3|svf)$") {
   lookup;
}

}

_
MSN Messenger를 통해 온라인상에 있는 친구와 대화를 나누세요.   
http://www.msn.co.kr/messenger 

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


pass vs pipe

2007-08-20 Thread Ramon Navarro Bosch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi !

Doing some installations of varnish with plone instances we had some
problems:

We are using a vcl from from plone.recipe.varnish that has this part :


...

sub vcl_recv {

if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup;
}

if (req.request != "GET" && req.request != "HEAD") {
# Do not try to cache POST
pass;
}

if (req.http.Expect) {
pipe;
}
...

VARNISH VERSION I USE: branch/1.1

the problem is on the not GET/HEAD rule :

if we choose pass some people get error on POST commits ( don't respond )

if we choose pipe some people get error ( it's my case ) that it takes
a long time and finally
  it gave an error complaining about upstream. In my case I can't
access directly to the backend
  as it's filtered by a firewall, maybe a reason ?

On my last tests I've just updated the 1.1 branch of varnish and now
pipe seems to work and pass don't.
Does anybody know what happens ?

Thanks !

Ramon
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyWfck3vgE06ET70RAmHyAJ94LyiTGKKDaPjkVYzWbmAScnlaRwCfRxTS
Rpgzxz1KjxqF0VSVP706gXI=
=zJSn
-END PGP SIGNATURE-

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


Re: Varnish on Mac OS X

2007-08-20 Thread Dag-Erling Smørgrav
With the changes I made last night and this morning, Mac OS X passes
all the tests that the other platforms also pass.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: 1.1.1 progress

2007-08-20 Thread Dag-Erling Smørgrav
Janis Putrams <[EMAIL PROTECTED]> writes:
> Anyway I wanted to capture core file so run varnishd in foreground.
> [...]
> 05:17:28 root[pts/[EMAIL PROTECTED] ~# ulimit -a|grep core
> core file size  (blocks, -c) 65

you should use 'unlimited' instead; a varnishd core dump can easily
reach tens or hundreds of megabytes.

> Though I found no core file after this. Please suggest what could I
> do to trace it.

It will be in $localstatedir/varnish/$varnish_name (probably
/var/lib/varnish/`uname -n`)

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: 1.1.1 progress

2007-08-20 Thread Janis Putrams
Hi!

With "master crash log" i meant output of varnishlog when management process 
dies.

Anyway I wanted to capture core file so run varnishd in foreground.

I set 
CXXFLAGS="-g"
LDFLAGS="-g"
in configure.ac. then run
./configure --prefix=/usr --enable-debug && make clean && make

05:17:28 root[pts/[EMAIL PROTECTED] ~# ulimit -a|grep core
core file size  (blocks, -c) 65


08:06:24 root[pts/[EMAIL PROTECTED] ~# varnishd -d -d -f 
/etc/varnishd/varnishd.conf -T 127.0.0.1:81 -P /var/run/varnishd.pid
file /var/spool/varnishd/varnishd_storage.bin size 536870912 bytes (131072 
fs-blocks, 131072 pages)
Using old SHMFILE
rolling(1)...
rolling(2)...
start
CLI 
start child pid 23327
200 0

Child said (2, 23327): <>
Child said (2, 23327): <>
Cache child died pid=23327 status=0xb
Clean child
Child cleaned
start child pid 23404
Child said (2, 23404): <>
Child said (2, 23404): <>
Cache child died pid=23404 status=0xb
Clean child
Child cleaned
start child pid 23484
...
>>
Child said (2, 28871): <>
Cache child died pid=28871 status=0xb
Clean child
Child cleaned
start child pid 28900
Child said (2, 28900): <>
Child said (2, 28900): <>
Cache child died pid=28900 status=0xb
Clean child
Child cleaned
start child pid 28936
Pushing vcls failed:
CLI communication error
Child said (1, 28936): <>
unlink ./bin.XXQ9wDR6
14:00:53 root[pts/[EMAIL PROTECTED] ~#

Though I found no core file after this. Please suggest what could I do to trace 
it.

Thanks,
Janis

On Saturday 18 August 2007 13:39, Dag-Erling Smørgrav wrote:
> Janis Putrams <[EMAIL PROTECTED]> writes:
> > I have been running varnishd from svn @Aug 16 06:17 and I managed to
> > capture master crash log.
>
> I have no idea what a "master crash log" is, but the varnish log you
> included is corrupted and doesn't tell me much, except that most of
> your traffic is piped to the backend rather than cached.  If you're
> having trouble with the management and / or worker process crashing,
> you should run varnish in the foreground (-d -d) to capture the error
> messages (most likely assertion failures), and get a backtrace.
>
> DES
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Redhat

2007-08-20 Thread Ingvar Hagelund
* jdouglas
> Are there instructions on installing this on Redhat systems?
> 
> I am able to get it working on FreeBSD 6.2 but not RHEL 4 with a 2.6 Kernel.
> 
> When I try to build an rpm from spec i get:
> (...)
> 
> RPM build errors:
> Installed (but unpackaged) file(s) found:
>/usr/include/varnish/shmlog.h
>/usr/include/varnish/shmlog_tags.h
>/usr/include/varnish/stat_field.h
>/usr/include/varnish/stats.h
>/usr/include/varnish/varnishapi.h
>/usr/lib/pkgconfig/varnishapi.pc

This is fixed in trunk. The fix will also be included in the upcoming
1.1.1 release.

Ingvar

-- 
At barnebokfigurer er snille er bare ljug
Mummipappa dater Barbamamma i smug
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc