Hi David <br><br>Thanks for reply i never modifying vcl_hit <br><br>my vcl <br><br><br>backend default {<br>    .host = "10.0.0.5";<br>    .port = "80";<br>    .connect_timeout = 1s;<br>    .first_byte_timeout = 5s;<br>
    .between_bytes_timeout = 2s;<br>}<br><br>backend srv1 {<br>    .host = "10.0.0.5";<br>    .port = "80";<br>    .connect_timeout = 1s;<br>    .first_byte_timeout = 5s;<br>    .between_bytes_timeout = 2s;<br>
}<br><br>backend srv2 {<br>    .host = "10.0.0.5";<br>    .port = "80";<br>    .connect_timeout = 1s;<br>    .first_byte_timeout = 5s;<br>    .between_bytes_timeout = 2s;<br>}<br><br>acl purge {<br><br>
    "localhost"; "127.0.0.1";<br>}<br><br>#recv<br>sub vcl_recv {<br><br>if (req.http.host ~ "<a href="http://www.foobar.com">www.foobar.com</a>") {<br>    set req.http.host = "<a href="http://www.foobar.com">www.foobar.com</a>";<br>
    if (req.restarts == 0) {<br>    set req.backend = srv1;<br>    } else if (req.restarts == 1) {<br>    set req.backend = allhabit2;<br>    }    <br>    <br>}elseif ( req.http.host ~ "<a href="http://www.zoobar.com">www.zoobar.com</a>") {<br>
    set req.http.host = "<a href="http://www.zoobar.com">www.zoobar.com</a>";<br>    if (req.restarts == 0) {<br>        set req.backend = srv1;<br>        } else if (req.restarts == 1) {<br>        set req.backend = srv2;<br>
        }    <br><br>}elseif ( req.http.host ~ "<a href="http://www.yoobar.com">www.yoobar.com</a>") {<br>    set req.http.host = "<a href="http://www.yoobar.com">www.yoobar.com</a>"; <br>    if (req.restarts == 0) {<br>
        set req.backend = srv1;<br>        } else if (req.restarts == 1) {<br>        set req.backend = srv2;<br>        }<br><br>}elseif ( req.http.host ~ "218.242.39.202") {<br>    set req.http.host = "118.142.39.202";<br>
    if (req.restarts == 0) {<br>        set req.backend = srv1;<br>        } else if (req.restarts == 1) {<br>        set req.backend = srv2;<br>        }<br><br>}elseif ( req.http.host ~ "218.242.39.203") {<br>
    set req.http.host = "118.142.39.203"; <br>    if (req.restarts == 0) {<br>        set req.backend = srv1;<br>        } else if (req.restarts == 1) {<br>        set req.backend = srv2;<br>        }    <br><br>
}elseif ( req.http.host ~ "204.186.59.41") {<br>    set req.http.host = "204.186.59.41";<br>    if (req.restarts == 0) {<br>        set req.backend = srv1;<br>        } else if (req.restarts == 1) {<br>
        set req.backend = srv2;<br>        }<br><br>}elseif ( req.http.host ~ "204.126.59.45") {<br>    set req.http.host = "204.126.59.45";<br>    if (req.restarts == 0) {<br>        set req.backend = srv1;<br>
        } else if (req.restarts == 1) {<br>        set req.backend = srv2;<br>        }<br><br>}else{<br>    error 401 "Bad Domain";<br>} <br><br>#set req.grace = 30s;<br><br># Add a unique header containing the client address<br>
remove req.http.X-Forwarded-For;<br>set    req.http.X-Forwarded-For = client.ip;<br># [...]<br><br><br>if (req.request == "PURGE") {<br>    if(!client.ip ~ purge) {<br>        error 405 "Not Allowed";<br>
    } lookup;}<br><br><br>#if (req.request != "GET" && req.request != "HEAD") {<br>#        pipe;<br>#    }<br><br>#if (req.request == "POST") {<br>#     pass;<br># }<br><br>if (req.http.Expect) {<br>
        pipe;<br>    }<br><br><br>if (req.request != "GET" &&<br>                req.request != "HEAD" &&<br>                req.request != "PUT" &&<br>                req.request != "POST" &&<br>
                req.request != "TRACE" &&<br>                req.request != "OPTIONS" &&<br>                req.request != "DELETE") {<br>                        /* Non-RFC2616 or CONNECT which is weird. */<br>
                        pipe;<br>        }<br>        if (req.request != "GET" && req.request != "HEAD") {<br>                /* We only deal with GET and HEAD by default */<br>                pass;<br>
        }<br><br><br><br><br>if (req.http.Cache-Control ~ "no-cache") {<br>        pass;<br>    } <br><br>if (req.http.Authenticate) {<br>    pass;<br>  }<br><br>#if (req.http.Cookie) {<br>#    pass;<br>#  }<br>
<br>if (req.url ~ "\.(zip|ico|dat|torrent|png|gif|jpg|swf|css|js|bmp|bz2|tbz|mp3|ogg)$") {<br>    unset req.http.cookie;<br>    lookup;<br>#    unset req.http.authenticate;<br>    }<br><br>if (req.http.Accept-Encoding) {<br>
    if (req.url ~ "\.(zip|ico|dat|torrent|png|gif|jpg|swf|css|js|bmp|bz2|tbz|mp3|ogg)$") {<br>            # No point in compressing these<br>            remove req.http.Accept-Encoding;<br>        } elsif (req.http.Accept-Encoding ~ "gzip") {<br>
            set req.http.Accept-Encoding = "gzip";<br>        } elsif (req.http.Accept-Encoding ~ "deflate") {<br>            set req.http.Accept-Encoding = "deflate";<br>        } else {<br>
            # unkown algorithm<br>            remove req.http.Accept-Encoding;<br>        }<br>    }<br><br><br>} #end recv<br><br><br>sub vcl_hash {<br>set req.hash += req.url;<br>set req.hash += req.http.host;<br>#set req.hash += req.http.cookie;<br>
#set req.hash += server.ip;<br>hash;<br>}  #end hash<br><br># sub vcl_hash {<br>#     set req.hash += req.url;<br>#     if (req.http.host) {<br>#         set req.hash += req.http.host;<br>#     } else {<br>#         set req.hash += server.ip;<br>
#     }<br>#     hash;<br># }<br><br><br>#if (req.http.Accept-Encoding ~ "gzip") {<br>#set req.hash += "gzip";<br>#}<br>#else if (req.http.Accept-Encoding ~ "deflate") {<br>#set req.hash += "deflate";<br>
#}<br><br>#hash;<br>#}  #end hash<br><br><br>#sub vcl_hash {<br>#        set req.hash += req.url;<br>#        set req.hash += req.http.host;<br><br>#        if (req.http.Accept-Encoding ~ "gzip") {<br>#                set req.hash += "gzip";<br>
#        }<br>#        else if (req.http.Accept-Encoding ~ "deflate") {<br>#                set req.hash += "deflate";<br>#        }<br>#} <br><br><br><br># strip the cookie before the image is inserted into cache.<br>
sub vcl_fetch {<br><br>#if (obj.status != 200 && obj.status != 302) {<br>#restart;<br>#}<br><br>    if(obj.http.Set-Cookie){<br>                pass;<br>                }<br><br><br>  if(obj.http.Pragma ~ "no-cache" || <br>
              obj.http.Cache-Control ~ "no-cache" || <br>            obj.http.Cache-Control ~ "private"){<br>            pass;<br>            }<br><br>#    set obj.grace = 30s;<br><br>    if (req.url ~ "\.(zip|ico|dat|torrent|png|gif|jpg|swf|css|js|bmp|bz2|tbz|mp3|ogg)$") {<br>
        unset obj.http.set-cookie;<br>        set obj.ttl = 1w;<br>               }<br><br><br>#    if (req.request == "GET" && req.url ~ "\.(txt|js)$") {<br>#                 set obj.ttl = 1d;<br>
#               } else {<br>#                 set obj.ttl = 1w;<br>#               }<br><br>if (req.url ~ "\.(zip|ico|dat|torrent|png|gif|jpg|swf|css|js|bmp|bz2|tbz|mp3|ogg)$") {<br>unset obj.http.expires;<br>set obj.http.cache-control = "max-age=315360000, public";<br>
set obj.ttl = 1w;<br>set obj.http.magicmarker = "1";<br>}<br><br><br><br>Thx<br><br>TW<br><br>#    if (obj.cacheable) {<br>#                        /* Remove Expires from backend, it's not long enough */<br>
#                        unset obj.http.expires;<br><br>#                        /* Set the clients TTL on this object */<br>#                        set obj.http.cache-control = "max-age=315360000, public";<br>
<br>#                        /* Set how long Varnish will keep it */<br>#                        set obj.ttl = 1w;<br><br>#                        /* marker for vcl_deliver to reset Age: */<br>#                        set obj.http.magicmarker = "1";<br>
#                }<br><br><br>    } #fetch end<br><br><br><br><br>sub vcl_deliver {<br>                if (resp.http.magicmarker) {<br>                        /* Remove the magic marker */<br>                        unset resp.http.magicmarker;<br>
<br>                        /* By definition we have a fresh object */<br>                        set resp.http.age = "0";<br>        if (obj.hits > 0) {<br>                    set resp.http.X-Cache = "HIT";<br>
            } else {<br>                    set resp.http.X-Cache = "MISS";<br>               }<br><br>                }<br>    <br><br><br>} #deliver end<br><br><br>sub vcl_pipe {<br>    # <a href="http://varnish.projects.linpro.no/ticket/451">http://varnish.projects.linpro.no/ticket/451</a><br>
    # This forces every pipe request to be the first one.<br>    set bereq.http.connection = "close";<br>} #pipe end<br><br><br><br><br>sub vcl_error {<br>    if (obj.status == 503) {<br>        restart;<br>    }<br>
} #error end <br><br><br><div class="gmail_quote">On Mon, Sep 21, 2009 at 6:33 AM, David Birdsong <span dir="ltr"><<a href="mailto:david.birdsong@gmail.com">david.birdsong@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Sun, Sep 20, 2009 at 3:29 PM, M L <<a href="mailto:ml@tinwong.com">ml@tinwong.com</a>> wrote:<br>
> Plz help, anyone have idea howto solve this problem ?<br>
><br>
> varnishd -a <a href="http://0.0.0.0:80" target="_blank">0.0.0.0:80</a> -T <a href="http://127.0.0.1:3500" target="_blank">127.0.0.1:3500</a> -p client_http11=on -f vconf2 -s<br>
> file,/usr/local/varnish/cache.bin,80G -h classic,500009 -p listen_depth=4096<br>
> -p obj_workspace=32768 -p sess_workspace=32768 -p send_timeout=327<br>
><br>
> I got this message from /var/log/messages<br>
><br>
> Sep 20 21:26:36 x2 varnishd[21933]: Child (21934) died signal=6 Sep 20<br>
> 21:26:36 x2 varnishd[21933]: Child (21934) Panic message: Assert error in<br>
> VRT_IP_string(), cache_vrt.c line 693: Condition((p = WS_Alloc(sp->http->ws,<br>
> len)) != 0) nlient = <a href="http://211.74.185.119:2909" target="_blank">211.74.185.119:2909</a>, step = STP_RECV, handling = error,<br>
> err_code = 503, err_reason = (null), ws = 0x2abeb5926078 { overflow id =<br>
> "sess", {s,f,r,e} = cname = { "input", "Default", }, }, },<br>
><br>
> Sep 20 21:26:36 x2 varnishd[21933]: child (21952) Started Sep 20 21:26:36 x2<br>
> varnishd[21933]: Child (21952) said Closed fds: 4 5 8 9 11 12 Sep 20<br>
> 21:26:36 x2 varnishd[21933]: Child (21952) said Child starts Sep 20 21:26:36<br>
> x2 varnishd[21933]: Child (21952) said managed to mmap 85899345920 bytes of<br>
> 85899345920 Sep 20 21:26:36 x2 varnishd[21933]: Child (21952) said Ready Sep<br>
> 20 21:28:10 x2 varnishd[21933]: Child (21952) died signal=6 Sep 20 21:28:10<br>
> x2 varnishd[21933]: Child (21952) Panic message: Assert error in<br>
> WS_Release(), cache_ws.c line 170: Condition(bytes <= ws->e - ws->f) not<br>
> true. thread = (10:32759, step = STP_RECV, handling = error, err_code = 503,<br>
> err_reason = (null), ws = 0x2abeb5a65078 { id = "sess", {s,f,r,e} =<br>
> {0x2abeb5a65808+32738,+32 "Default", }, }, },<br>
<br>
</div></div>what about your vcl file?<br>
<br>
are you modifying the object in vcl_hit at all?<br>
<br>
><br>
> Thanks alot<br>
><br>
> T W<br>
><br>
> _______________________________________________<br>
> varnish-misc mailing list<br>
> <a href="mailto:varnish-misc@projects.linpro.no">varnish-misc@projects.linpro.no</a><br>
> <a href="http://projects.linpro.no/mailman/listinfo/varnish-misc" target="_blank">http://projects.linpro.no/mailman/listinfo/varnish-misc</a><br>
><br>
><br>
</blockquote></div><br>