Re: varnishncsa of backend requests (changeset 4480)

2010-03-09 Thread Tollef Fog Heen
]] Rob S 

| Since http://varnish-cache.org/changeset/4480, we've lost the ability to 
| view backend requests in varnishncsa.

Yes, it didn't work properly, so we disabled it until we can provide the
information properly.

| Is there a recommended work around?  Can varnishlog be coaxed into 
| spitting out similar information, or is there another solution?

If you need it and are ok with the limitations, just revert the patch
locally?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Weird situation with unexpected 206 from the backend, hit-for-pass and default_ttl

2010-03-01 Thread Tollef Fog Heen
]] Thomas Parmelan 

|   - seeing as wrong as this backend answer is, I think it shouldn't be
| dealt with normally by varnish, it would me more interesting to
| let the next request have its chance to populate the cache with a
| valid (200) answer, in order to keep the following requests being
| able to be served from the cache. Is this something that should be
| changed in varnish, or in the vcl (and how) ?

We generally try to avoid guessing in the C code, so I think this should
be left for VCL.

|   - the TTL used for the HitPass object seems to be the default_ttl (-t
| 86400 in my setup); I tried to keep it low (0s or 10s) from the vcl
| config, like this :
| 
| sub vcl_fetch {
| if (!obj.cacheable) {
| set obj.ttl = 0s;
| return (pass);
| }
|   /* ... */
| }

What happens if you set obj.cacheable to true and ttl to 1s if the
response is a 206?  Does that work?

|   - I also tried to purge the hit-for-pass culprit with the CLI (purge
| req.host == the.host  req.url == /the/url), but it didn't work
| (the object was still there after). Any idea how to purge such
| objects ? Is this a bug ? 

According to phk on IRC, this should work and it not working is a bug.

If you have a chance to reproduce this in a test environment with both
2.0.6 and trunk, that'd be appreciated.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Not seeing a successful purge

2010-02-15 Thread Tollef Fog Heen
]] John Norman 

| I think it's the backend's (Apache/Passenger) header:
| 
| Vary: Accept-Encoding,User-Agent
| 
| Which seems to prevent (???) this from working in my vcl_hash:
| 
|   if (req.http.Accept-Encoding ~ gzip) {
| set req.hash += gzip;
|   } // etc

No, that works fine, but is useless.  Varnish does Vary handling
automatically.

| The Varnish doc says: But by default, Varnish will perform no
| transforms on the headers singled out by Vary: for comparison
| (http://varnish-cache.org/wiki/ArchitectureVary).

Yes, this means that if you know your backend only cares about
gzip/non-gzip, you should normalise the header in vcl_recv.  Varnish
can't know this, as it requires knowledge of your backend and
application.

However, even if you changed that, you still have a Vary on
user-agent. This is generally a really bad idea, and you should try to
see if you can vary on something else.  If you don't, you are going to
see poor hit rates. (Assuming that you're not just caching for a
corporate intranet where everybody has _exactly_ the same versions of
browser, etc.)

| So . . . I'm not sure what I should do. If the backend says Vary for
| Accept-Encoding, does that mean that I should or should not be able to
| access that header for the purposes of setting the hash?

Normalise Accept-Encoding, stop adding it to the hash.

| What I am observing is:
| 
| browser makes request with Accept-Encoding: gzip,deflate
| 
| When I try to purge, the request with the purge says: Accept-Encoding:
| gzip,identity
| 
| Even though gzip is in the request for both the browser
| Accept-Encoding, and for the purge, they seem to be getting hashed
| differently.

No, they hash to the same object but as the Vary-ed string differs the
Vary handling makes it out to be different objects.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnishlog not behaving as expected (by me)

2010-02-08 Thread Tollef Fog Heen
]] Poul-Henning Kamp 

| In message 4b6960da.6080...@bmjgroup.com, Alex Hooper writes:
| 
|/usr/local/bin/varnishlog -o RxURL ^wp-admin$
| 
| This says you want to *O*mit all RxURL lines.  The regexp argument
| should have generated an argument error.

No, it doesn't:

 -o  Group log entries by request ID.  This has no effect when
 writing to a file using the -w option.

The printing of non-client and non-backend lines is really a bug.
Please just file a ticket and we can get it fixed.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: 503 Errors on POST

2010-02-08 Thread Tollef Fog Heen
]] Torrance 

| I've pasted the logs of two failed requests below. As you can see,
| they're both in response to POST requests, though I was overstating the
| frequency at which these errors are occurring: they're occurring about
| 10% of the time.

From looking at this, it might be that your backend is too slow.  We
have a default backend connection timeout of just 0.4 seconds.  Try
increasing that somewhat?  It's a bit surprising that should just hit
POST requests, though.  Alternatively, try with 2.0.6 since it'll have a
«FetchError» log entry when if fails.

| To be honest, I don't entirely understand the logs or their format, but
| I hope I've captured the important details. (Session IDs have been
| deleted, btw).

You have and the session entries are not important.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish graphs

2010-02-03 Thread Tollef Fog Heen
]] pablort 

| Nah. using 2.0.6

Hmm, indeed.

I just fixed it in trunk, will backport it to 2.0 branch.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Survey; how do you use Varnish?

2010-02-02 Thread Tollef Fog Heen
]] Václav Bílek 

| 5)gracefull restart( not in meaning of persistent cache, but in the
| meaning of not flushing all clients and letting them wait for tens of
| seconds till enough threads appear.)

You can tune the thread_pool_add_delay parameter to at least bring the
time down somewhat.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: GRSEC and Varnish

2010-02-02 Thread Tollef Fog Heen
]] Bernardf FRIT 

| Then the parent varnishd process starts immediately a new child process 
| which lasts some time.
| 
| Is there any way to fix this. Remocve the GRSEC kernel ? Upgrade the 
| kernel ? Varnish ? or whatever ?

Work out why it thinks that varnishd is doing something wrong?  It
doesn't seem to say so in the log.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish graphs

2010-01-29 Thread Tollef Fog Heen
]] pablort 

| The numbers do reflect the TxStatus'es that I see in interactive varnishtop,
| but when I try to run it with -1, it doesn't show which entry corresponds to
| which status. LOL.

You're running an old version, this was fixed in 2.0.5 so upgrading
should fix that.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Not Able to Purge in Varnish

2010-01-29 Thread Tollef Fog Heen
]] Abhishek Singh 

| I am using varnish for static files caching and multiple domains are getting
| served from varnish cluster  and i want to purge static files for specific
| domain so how can i do that.
| 
| I tired following but it is not working.
| 
| 1)
| purge req.http.host ~ xyz.com
| 101 44
| Unknown request.
| Type 'help' for more info

Which version are you using?  I suspect you're using an old version.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Release schedule for saint mode.

2010-01-29 Thread Tollef Fog Heen
]] Ken Brownfield 

| Right, -spersistent.  Child restarts are persistent, parent process 
stop/start isn't.

It should be.  You'll lose the last storage silo (since that's not
closed yet), but older objects should be available.

Can you see if you can reproduce and post a varnishlog -1 when the child
has restarted as well as after having restarted the parent?

| Maybe there's a graceful, undocumented method of stopping the parent that I'm 
not aware of?

Shouldn't matter.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Release schedule for saint mode.

2010-01-27 Thread Tollef Fog Heen
]] Ken Brownfield 

| I'd love to test persistent under production load, but right now it's
| not persistent. :-( (Storage doesn't persist through a parent restart)

That sounds like a real bug.  Just to be sure, you're testing with
-spersistent, not -smalloc or -sfile?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish extensions for SSO support

2010-01-26 Thread Tollef Fog Heen
]] Sam Crawford 

| Whilst I know it's technically feasible for us to do this, I was
| wondering (a) if anyone is already doing something similar and (b) if
| the community thinks I'm completely mad for evening thinking about
| doing it :-)

a) Not to my knowledge, but I've had people ask similar questions in the
past, but then more of a «is it easy to do authentication in Varnish»
question.

b) Done carefully, it sounds reasonable enough to have.  Depending on
how much traffic you have, you want to cache and keep as much of this
information in varnish itself so you don't have to open connections and
ask network services for each cache hit.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Restoring cookies on a miss

2010-01-26 Thread Tollef Fog Heen
]] John Norman 

Hi,

| And again, here's the use case:
| 
| We have certain pages that should never be cached. The user comes in
| with cookies set: session=foo or some such.
| 
| We strip the cookie and do a lookup.
| 
| If there's a hit, return what is in the cache.
| 
| If there's a miss, we'd like to fetch with the cookie.
| 
| Then, in fetch, pass for pages set for no-cache, and deliver for those
| that are public.

Sounds reasonable enough.

| It can be assumed that these pages are never hit first by non-cookied users.
| 
| But -- I am seeing a lot of requests that have no cookies on the backend.

Can you capture a varnishlog from when this happens?  It'd be
interesting to see if the incoming request has a cookie set.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: 504 gateway time-out

2010-01-26 Thread Tollef Fog Heen
]] Angelo Höngens 

| Can anyone tell me when a 504 Gateway Time-out occurs exactly?
| 
| I have varnish in front of haproxy, and whatever I do to, I can only get
| a 503 Service Unavailable error, while my clients sometimes tell me
| they get the 504..

I don't believe we ever send out 504s.  Maybe it's from haproxy when the
backend it's talking to takes too long to respond?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: comparing 2 headers

2010-01-25 Thread Tollef Fog Heen
]] Angelo Höngens 

| 1. What will happen when the dataset I want to pass through Varnish is
| much larger than the Varnish machines could store? I would expect the
| cache hit ratio to go down, and Varnish to start evicting objects from
| the cache more frequently. Or will Varnish just crash and burn with a
| 'cache is full' message? :)

It uses an LRU list to evict the object that's the longest since it
used.  This can impact performance somewhat as it often evicts a bit too
many objects at a time and like all kinds of garbage collections, happen
at a bad time, but it won't crash and burn.

| 2. I run the varnishncsa daemon to write to logfile. However, I would
| really like to see some extra information like whether it was a cache
| hit or miss, and the last time to byte to the client in the logfile,
| like squid does in it's access.log. This is really really handy for
| post-mortem analysis. (We read everything into a database sometimes and
| let the dba's do their thing.)
| 
| Is there any way to do this, or can you point me in the right direction?

At the moment: just change varnishncsa and recompile.

| 3. I want to compare some headers, but I'm getting a compile error:
| 
| Message from VCC-compiler:
| Expected CSTR got 'server.ip'
| (program line 266), at
| (input Line 1279 Pos 24)
|   if (req.http.host == server.ip) { error 200 ok; }
| ---#
| Running VCC-compiler failed, exit 1
| VCL compilation failed
|
| I want to make sure that when I point my browser to http://w.x.y.z, I
| get a message 200 ok. Am I doing something wrong? I'm using
| Varnish-2.0.4 from ports by the way.

Upgrade.  This does work fine with at least 2.0.6 (just tested).

| 4. Is there some documentation on what the ReqEnd and StatSess values
| mean in the varnishlog output? The values seem interesting, but I have
| no idea what they are.

http://varnish.projects.linpro.no/wiki/Varnishlog has the tiny start of
some docs.  Help writing up the description of all the tags would be
appreciated.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Release schedule for saint mode.

2010-01-25 Thread Tollef Fog Heen
]] pablort 

| And how about 2.1 ? Any release date on the horizon ? :D

Persistent needs more testing before we can release it.  If you're in a
position where you can test it: please do so and report back, especially
if you can make it crash with backtraces.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish Prefetch

2010-01-25 Thread Tollef Fog Heen
]] Paras Fadte 

| Is prefetch by default enabled in varnish ?

No, it is not implemented and any references to it should be ignored.
It is also removed in trunk.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Release schedule for saint mode.

2010-01-20 Thread Tollef Fog Heen
]] pablort 

| Anybody knows what's the plan to release saint mode ? :D

It's in trunk.  It's not going to be backported to 2.0 itself as some of
its requirements are not in 2.0 and considered hard to backport without
backporting significant changes from trunk leading to what I believe is
an unacceptable risk of breakages.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: feature request cache refresh

2010-01-20 Thread Tollef Fog Heen
]] Martin Boer 

| If anyone has a workable workaround to achieve the same results I'm very 
| interested.
| 
| The reason I would like this feature is because our webshop has almost 
| hourly changing prices. This means we can't cache all related pages (or 
| not for very long) and at the same time that the backends receive a 
| requests they have to rebuild data from several databases which is slow.

You could just purge the pages that refer to a given product by doing
something like:

- Make sure all products on a page are listed in a X-Products header, so you 
have
  something like: X-Products: 123, 456, 789.
- When the price of product 123 changes, issue a
purge obj.http.x-products ~ 123
- Magically, all relevant product pages should be purged.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Health check -- just connect, or full response?

2010-01-20 Thread Tollef Fog Heen
]] Poul-Henning Kamp 

| In message b6b8b6b71001191152u7be99773o5ec70b20026...@mail.gmail.com, John 
No
| rman writes:
| Folks,
| 
| For the health check (or, ahem, backend probe, as the docs has it --
| ouch!), does health constitute ability to connect?
| 
| Or does it check for a 200?
| 
| It checks 200

Actually, it checks for .expected_response (which does default to 200),
so you can override it if you need that.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Strategies for splitting load across varnish instances? And avoiding single-point-of-failure?

2010-01-18 Thread Tollef Fog Heen
]] Ken Brownfield 

| 3) Hash/bucket URLs to cache pairs.
| 
| Same as 2), but for every hash bucket you would send those hits to two
| machines (think RAID-10).  This provides redundancy from the effects
| of 2a), and gives essentially infinite scalability for the price of
| doubling your miss rate once (two machines per bucket caching the same
| data).  The caveat from 2b) still applies.

I've pondered having a semi-stable hash algorithm which would hash to
one host, say, 90% of the time and another 10% of the time.  This would
allow you much more flexible scalability here as you would not need
twice the number of servers, only the number you need to have
redundant.  And you could tune the extra cache miss rate versus how much
redundancy you need.

I don't know of any products having this out of the box.  I am fairly
sure you could do it on F5s using iRules, and I would not be surprised
if HAProxy or nginx can either do it or be taught how to do this.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Handling of cache-control

2010-01-18 Thread Tollef Fog Heen

Hi all,

we are considering changing the defaults on how the cache-control header
is handled in Varnish.  Currently, we only look at s-maxage and maxage
to decide if and how long an object should be cached.  (We also look at
expires, but that's not relevant here.)

My suggestion is to also look at Cache-control: no-cache, possibly also
private and no-store and obey those.  You would still be able to
override this in vcl by setting obj.cacheable to true and the ttl to
some value.

The reason I think we should at least consider changing this is the
principle of least surprise: we support max-age and s-maxage, so we
should also support the other common values of the cache-control header
field.

Feedback very welcome,

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Purging known specific document.

2010-01-13 Thread Tollef Fog Heen
]] pub crawler 

| tried:
| purge.url images.pubcrawler.com/art/2.png
| 
| Get:
| 200 0
| 
| Assuming 200 means completed and 0 is number purged?

No.  200 means ok, 0 means «no bytes in reply»

You probably want to do 

purge req.url == /art/2.png  req.http.host == images.pubcrawler.com

http://varnish.projects.linpro.no/wiki/Purging talks a bit more about it.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish suddenly restarting / flushing itself after several hours? can ping response time be configure?

2010-01-13 Thread Tollef Fog Heen
]] Frank van Lingen 

| Everything works fine (the restart is graceful), but it is still
| restarting (see below). I installed it on a non virtualized box and
| have no problems with it. I suspect that it might have something to do
| with the resources allocated to the VM.
| 
| Is there a way to configure the number of times it pings before restart?

Increase the cli_timeout parameter by passing -p cli_timeout=$number to
varnishd.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: grace scenario - app side and varnish

2010-01-13 Thread Tollef Fog Heen
]] John Norman 

| I would like to set grace in Varnish so that this stays in the cache
| for some long amount of time, and then when I hit the site, I get
| stale content (no wait), and the backend gets triggered to refresh the
| cache.

grace works by serving old content to any clients which would otherwise
be put on a wait list.  It does not prefect or fetch asynchronously.  So
with grace, the first client has to wait, and any subsequent ones just
get the graced content.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish child failing to be restarted

2010-01-05 Thread Tollef Fog Heen
]] Jeremy Hinegardner 

| I'm wondering if there are two issues here.  The first being, why does
| our child process die many times during the day, and the 2nd being, why
| does the restarting of the child fail sometimes.

It seems to be killed by the management process.  If the box is
otherwise healthy when this happens, try increasing cli_timeout.  If
it's quite loaded, I would suggest doing the regular performance tuning
such as putting the shmlog on a tmpfs and making sure your working set
fits in RAM (or use SSDs).

| In our case, the failure to restart the child is always when the
| Pushing vcls failed error appears in the log. 

This is an independent bug.  I _think_ it is timing-related after a
child is killed, but I'm not exactly sure.

Cheers,
-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish 503 Service unavailable error

2010-01-04 Thread Tollef Fog Heen
]] Paras Fadte 

| Sometimes I see following  when using varnishlog
| 
| *Interrupted  b BackendOpen*
| 
| What does it mean and under what condition(s) does it occur ?

From the varnishlog source code:

  /* This is the start of a new request, yet we haven't seen the end of
   the previous one.  Spit it out anyway before starting on the new
   one. */

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Connection issues on Solaris 10 (Accept failed: Bad file number)

2010-01-04 Thread Tollef Fog Heen
]] Jim Hayter 

| I've tried running both 2.0.5 and 2.0.6 on a Sun intel box running
| Solaris 10.
| 
| Varnish works for a while and then starts generating log output like the
| examples below, reporting nothing but  Accept failed: Bad file number.
| I raised the process file descriptor limit, but that did not help.
| 
| Is anyone using Varnish 2.0.x on a Sun intel box running Solaris 10?  If
| so, do you have any suggestions?

Can you try some of the suggestions on
http://letsgetdugg.com/2009/12/04/varnish-on-solaris/ ?  If they help,
please tell us so we can try to find out what's wrong with the ports
implementation.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Unconditional GETs and 304 from backend servers

2010-01-04 Thread Tollef Fog Heen
]] Daniel Rodriguez 

| The problem that we are currently having is that varnish will only ask
| unconditional GETs, so every time that varnish ask the web server for
| one of this objects after the age have expired (expecting a 200 and a
| full refresh) our servers have to recreate the whole objects (some of
| them taking a lot of CPU and time) even if this is not needed (in
| normal conditions with conditional GET they will reply 304 with less
| CPU usage).
| 
| There is a possible solution to this ? maybe a workaround using VCL ?

Varnish doesn't do conditional GETs, but you could switch the system
around and do active cache management where you set the TTL of objects
to infinity (well, 2 years or something other, high) and let the backend
use purge to remove objects that should be evicted.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Handling 304 and header refresh

2009-12-03 Thread Tollef Fog Heen
]] Daniel Rodriguez 

|13 BackendOpen  b default 192.168.55.18 38239 192.168.9.158 80
|12 Backend  c 13 default default
|13 TxRequestb GET
|13 TxURLb /test/prueba.php
|13 TxProtocol   b HTTP/1.1
|13 TxHeader b Host: www.foo.com
|13 TxHeader b User-Agent: Mozilla/5.0 (X11; U; Linux i686;
| en-US; rv:1.9.0.3) Gecko/2008092816 Iceweasel/3.0.3 (Debian-3.0.3-3)
|13 TxHeader b Accept:
| text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
|13 TxHeader b Accept-Language: en-us,en;q=0.5
|13 TxHeader b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
|13 TxHeader b X-Forwarded-For: 192.168.90.41
|13 TxHeader b Accept-Encoding: gzip
|13 TxHeader b X-Varnish: 484826741
|13 TxHeader b X-Forwarded-For: 192.168.90.41
|13 RxProtocol   b HTTP/1.1
|13 RxStatus b 304
|13 RxResponse   b Not Modified
|13 RxHeader b Date: Tue, 01 Dec 2009 10:50:33 GMT
|13 RxHeader b Server: Apache
|13 RxHeader b Connection: close
|13 RxHeader b Cache-control: max-age=401

Your backend seems to reply with 304 to an unconditional GET request,
which is quite odd.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Handling 304 and header refresh

2009-11-30 Thread Tollef Fog Heen
]] Daniel Rodriguez 

|13 TxHeader b Cookie: foo.comGlobal=0; cUser=nouser

You need to strip the cookie before sending the request to the backend,
else you will end up pass-ing the request.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: forget an object in vcl_fetch

2009-11-27 Thread Tollef Fog Heen
]] David Birdsong 

|  sub vcl_fetch {
|   if (!beresp.X-Super-Hot-File) {
|     unset obj.cacheable;
|   }
|  }
|
| ok, i tried this and was not allowed to modify this attribute.

You can set it to true or false, but you can't unset it.

| just out of curiosity i tried 'pass' instead but that also caused disk
| hits.  is there anyway to completely pass traffic through without
| varnish storing it?

You can pipe it, but then you end up closing the connection afterwards.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: vcl_timeout and fetch

2009-11-27 Thread Tollef Fog Heen
]] ll 

| so,is there any ways to set the varnish to fetch the cache and flash it
| automatic ? I have a webserver,it has so many pages ,I want to varnish
| can fetch all pages one time and keep it a long time .and after the
| ttl,it can flash it automatic .Is it some ways to accomplish this ?

No, it's not something we support.  We considered it for a while, but
decided against it in the end.  You might want to look at grace which
does solve approximately the same problem most people are trying to
solve with prefetch.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: http format error

2009-11-27 Thread Tollef Fog Heen
]] Tobias Wilken 

| I've got a strange behavior of varnish and wordpress. After installing
| and configuring wordpress without problems, I get a Error 503 Service
| Unavailable ...  Error on the front end and a http format error in
| the varnishlog, when I try to change the admin password of wordpress.
| 
| I'm not sure on which side the problem lies, does varnish check the
| http format to strictly or does wordpress hopes that the
| webserver/proxies do not interpret the response so exactly. In my
| current opinion it will be a wordpress problem, but it don't make
| sense to talk to the wordpress team, with the information My varnish
| throws an 'http format error'. So I would like to understand a bit
| better, what this error should tell me and where to find the problem
| more exactly.

It means Varnish has problems dissecting the response from the backend.

As you can see in the log:

   17 LostHeader   b Content-Length: 20

Try compiling Varnish with a higher maximum number of HTTP headers, just
increasing the limit to 64 or so should be ok.

Poul-Henning, should we just bump the default?  Wordpress is fairly
popular and requiring a recompilation to work correctly is a bit on the
heavy side.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish bottleneck?

2009-11-27 Thread Tollef Fog Heen
]] ll 

| if (req.http.host ~www.abc.cn){
| lookup;
| }
| it's well. Varnish can cache everything .but some function of the
| website is unable .eg POST. So I put the POST judge before the HOST
| .like that :
| if (req.request == POST){
| pipe;
| }
| if (req.http.host ~www.abc.cn){
| lookup;
| }
| there are some problem .many of url's record can't be find in the
| varnishlog .and there are no marked by the varnish eg X-Cache: MISS in
| the Response Headers .

Yes, this is how pipe works.  You might want to read up on pass vs pipe.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: vcl_timeout and fetch

2009-11-27 Thread Tollef Fog Heen
]] ll 

Hi,

| If the backend takes a long time to generate an object there is a risk
| of a thread pile up. In order to prevent this you can enable
| grace. This allows varnish to serve an expired version of the object
| while a fresh object is being generated by the backend.
| 
| how can it have the prefetch function ??

I did not say it was the same thing, I said it solves the same problem
that people are trying to solve with prefetch, namely thread pileups
when you have many clients waiting on an object to come back from the
backend.  Since you don't seem to think it solves your problem, what is
the problem you are trying to solve?

Regards,
-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish 503 Service unavailable error

2009-11-12 Thread Tollef Fog Heen
]] Paras Fadte 

| After increasing the connect_timeout and first_byte_timeout values the
| erros have reduced. I also tried to get transaction for 503 error and
| following is part of the transaction for the same
| 
|   230 VCL_call c recv lookup
|   230 VCL_call c hash hash
|   230 VCL_call c miss fetch
|   230 VCL_call c error deliver

It fails to get the result from the backend.  Upgrade to 2.0.5 and look
at the FetchError tag which will hopefully explain a bit more what goes
wrong.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Caching POSTs

2009-11-06 Thread Tollef Fog Heen
]] Rob Ayres 

| I want to cache POSTs but can't get varnish to do it, is it possible? If it
| makes it any easier, all requests through this cache will be of POST type.

No, you can't cache POSTs.  It doesn't make any sense to do so.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Write error, len = 69696/260844, errno = Success

2009-11-06 Thread Tollef Fog Heen
]] Václav Bílek 

| Is there anyone who can point us where to look to find the problem?

As you are getting a write error and not a timeout, I would take a look
at any load balancers or similar that are configured to kill connections
that take more than 5s.  It doesn't look like anything Varnish is doing.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Yahoo! Traffic Server

2009-11-03 Thread Tollef Fog Heen
]] Ask Bjørn Hansen 

| I thought this might be of interest:
| 
|   http://wiki.apache.org/incubator/TrafficServerProposal

Yeah, I've been following it loosely for a while now.

A quick feature comparison (just based off the incubator page):

# Scalable on SMP (TS is a hybrid thread + event processor)

This might be an interesting direction to take Varnish in at some point
as slow clients are a problem for us now.  Being able to punt them off
to a pool of event-based threads would be useful.

# Extensible: TS has a feature rich plugin API

We don't have this, though you can get some of it by inlining C.
There's a proposal out for how to do it.  Whether we end up doing it
remains to be seen, though.

«We have benchmarked Traffic Server to handle in excess of 35,000 RPS on
a single box.»

I know Kristian has benchmarked Varnish to about three times that,
though with 1-byte objects, so it's not really anything resembling a
real-life scenario.  I think sky has been serving ~64k requests/s using
synthetic.

# Porting to more Unix flavors (currently we only support Linux)

We have this already, at least to some degree.

# Add missing features, e.g., CARP, HTCP, ESI and native IPv6

We have native ipv6 and ESI at least.  CARP and HTCP we don't.

Their code seems to be C++ (they depend on STL)

They support HTTPS, which we don't.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Trying to use X-Backend to select backend

2009-11-02 Thread Tollef Fog Heen
]] Bernardf FRIT

Hi,

|  | I downgraded varnish to v 2.0.3 in order to use the
|  | varnish-bereq-hosts.patch
| 
|  Which patch is this?
|
| http://varnish.projects.linpro.no/attachment/ticket/481/

I doubt we'll want to merge this, as it's unneeded in trunk.

|  |   1. Store the backend name into X-Backend custom header
|  |   2. Force each request with  a X-Backend header to be directed to the
|  |  stored backend name
| 
|  There is currently no way to look up backends by name, so you would have
|  to write this as a series of if statements

| Yes it worked but didn't do the job I expected. After first request to
| the site I want the browser to be always directed to the same backend
| (due to sessionId management). I think I have to use Cookies to
| achieve this or just serve static content with varnish and use haproxy
| as backend for dynamic content.
| 
| I'm just wondering which solution is best :
| - varnish as frontend to haproxy
| - haproxy as frontend to varnish

Either should work fine, but test.  You could just also move all static
content to a different host name and let haproxy be the dynamic one and
varnish the static one.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Trying to use X-Backend to select backend

2009-10-30 Thread Tollef Fog Heen
]] Bernardf FRIT 

| I downgraded varnish to v 2.0.3 in order to use the
| varnish-bereq-hosts.patch

Which patch is this?

|   1. Store the backend name into X-Backend custom header
|   2. Force each request with  a X-Backend header to be directed to the
|  stored backend name

There is currently no way to look up backends by name, so you would have
to write this as a series of if statements.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish 2.0.4 questions - no IMS, no persistence cache - please help

2009-10-27 Thread Tollef Fog Heen
]] GaneshKumar Natarajan 

| Thanks  Tollef Fog Heen for the response.
|  | 3. mmap storage : max i can configure is 340 GB.
|  This looks weird.  Can you tell us something about what OS and kernel
|  versions you are running?
| 
| Please find the details below. Let me know what i could try to
| increase mmap storage from my current limitation of 340 G.
| details:

Does it work if you run it with multiple -s arguments that are each
smaller?  Can you paste the output of ulimit -a?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish 2.0.4 questions - no IMS, no persistence cache - please help

2009-10-23 Thread Tollef Fog Heen
]] GaneshKumar Natarajan 

| 1. varnish doesn't send IMS request, when the object expires.

Correct.  This is somewhat hard to do, but we see the request coming in
regularly so it's something we might want to change at some point.  I
don't believe there is any way to achieve this using VCL.

| 2. Varnish cache is not persistent.

Correct, this is being fixed for 2.1.  (It's the major feature for 2.1.)

| 3. mmap storage : max i can configure is 340 GB.
| 
| detail::
| I was able to use only 340 GB of cache. any size after this, i would get 
error.
| child (25790) Started
| Pushing vcls failed: dlopen(./vcl.1P9zoqAU.so): ./vcl.1P9zoqAU.so:
| failed to map segment from shared object: Cannot allocate memory

This looks weird.  Can you tell us something about what OS and kernel
versions you are running?

| 4. I tried malloc storage option.
| Question:
| i have system of 32 GB physical ram and my swap storage is 65 GB.
| harddisk storage - 1.5 TB ( distribued in 5 cache directoreys
| /cach0,.../cache1 ).
| What is the best optimal malloc storage i can use to achive greater 
performance?
| -s malloc, [ size ] ???

It depends on your setup and your traffic patterns, so it's usually best
to try some different ones.

| 5. what is the difference between using malloc or mmap?
| 
| Help me to move onto varnish world and convince others in my team.

malloc is, well, using malloc to allocate the memory, letting the system
swap handle any page-outs.  mmap is just mmap-ing a large file, which
still leaves it to the system to page out the unused bits, but often
somewhat different code paths.  Which one is better depends on OS,
traffic pattern, amount of memory, etc.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: if-none-match status

2009-10-23 Thread Tollef Fog Heen
]] Rogério Schneider 

| 2009/10/9 Joe Williams j...@joetify.com:
| 
|  Thanks Rogério, I am totally aware that it currently is client -
|  varnish communication that deals with if-none-match. My question is
| 
| ah, ok :)
| 
|  whether it was considered making an option for doing this on varnish
|  - backend communication as well since it seems like a reasonable way
|  to validate objects in the cache during lookups. Does the varnish
|  project have a (official or unofficial) policy regarding doing
|  backend communication with conditions?
| 
| Now that is a question I think others could answer (tollef, sky,
| phk?). I really do not know.

It's somewhat hard to do and not really on the list for now.  If
somebody shows up with a patch or money to fund the development, we can
take a look at it, but for now, it's nowhere near the top of list of
features we want to implement.

[...]

| Needless to say, this could be valid and very useful.

Absolutely, it's a completely valid feature request.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: backend health checks and 204

2009-10-23 Thread Tollef Fog Heen
]] David Birdsong 

| I couldn't find this anywhere, so apologies if it's already been hashed out.
| 
| Would it be possible for the backend health checks to be altered to
| consider a 204 response from a backend as healthy?

The attached patch does that.  It's against trunk.  phk, please review
and ack/nack.  (It needs documentation and possibly a test case.)

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
From c443cb77c965a65dd670a876f371e5c5a058bcd2 Mon Sep 17 00:00:00 2001
From: Tollef Fog Heen tfh...@err.no
Date: Fri, 23 Oct 2009 11:49:14 +0200
Subject: [PATCH] Add support for setting the expected response for backend probes.

Syntax is

backend b0 {
.host = 127.0.0.1;
.probe = {
.url = /test.jpg;
.timeout = 224 ms;
			.expected_response = 204;
}
}
---
 varnish-cache/bin/varnishd/cache_backend_poll.c |5 -
 varnish-cache/include/vrt.h |1 +
 varnish-cache/lib/libvcl/vcc_backend.c  |9 -
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/varnish-cache/bin/varnishd/cache_backend_poll.c b/varnish-cache/bin/varnishd/cache_backend_poll.c
index 2ab08ca..fe7f8b3 100644
--- a/varnish-cache/bin/varnishd/cache_backend_poll.c
+++ b/varnish-cache/bin/varnishd/cache_backend_poll.c
@@ -237,7 +237,7 @@ vbp_poke(struct vbp_target *vt)
 
 	i = sscanf(vt-resp_buf, HTTP/%*f %u %s, resp, buf);
 
-	if (i == 2  resp == 200)
+	if (i == 2  resp == vt-probe.expected_response)
 		vt-happy |= 1;
 }
 
@@ -340,6 +340,9 @@ vbp_wrk_poll_backend(void *priv)
 	if (vt-probe.threshold == ~0U)
 		vt-probe.initial = vt-probe.threshold - 1;
 
+	if (vt-probe.expected_response == 0)
+		vt-probe.expected_response = 200;
+
 	if (vt-probe.initial  vt-probe.threshold)
 		vt-probe.initial = vt-probe.threshold;
 
diff --git a/varnish-cache/include/vrt.h b/varnish-cache/include/vrt.h
index 5f6250e..2a7ef3a 100644
--- a/varnish-cache/include/vrt.h
+++ b/varnish-cache/include/vrt.h
@@ -55,6 +55,7 @@ struct vrt_backend_probe {
 	unsigned	window;
 	unsigned	threshold;
 	unsigned	initial;
+	unsigned	expected_response;
 };
 
 /*
diff --git a/varnish-cache/lib/libvcl/vcc_backend.c b/varnish-cache/lib/libvcl/vcc_backend.c
index c0b206c..2575107 100644
--- a/varnish-cache/lib/libvcl/vcc_backend.c
+++ b/varnish-cache/lib/libvcl/vcc_backend.c
@@ -343,7 +343,7 @@ vcc_ParseProbe(struct tokenlist *tl)
 	struct token *t_field;
 	struct token *t_did = NULL, *t_window = NULL, *t_threshold = NULL;
 	struct token *t_initial = NULL;
-	unsigned window, threshold, initial;
+	unsigned window, threshold, initial, expected_response;
 
 	fs = vcc_FldSpec(tl,
 	?url,
@@ -353,6 +353,7 @@ vcc_ParseProbe(struct tokenlist *tl)
 	?window,
 	?threshold,
 	?initial,
+	?expected_response,
 	NULL);
 
 	ExpectErr(tl, '{');
@@ -361,6 +362,7 @@ vcc_ParseProbe(struct tokenlist *tl)
 	window = 0;
 	threshold = 0;
 	initial = 0;
+	expected_response = 0;
 	Fb(tl, 0, \t.probe = {\n);
 	while (tl-t-tok != '}') {
 
@@ -411,6 +413,10 @@ vcc_ParseProbe(struct tokenlist *tl)
 			threshold = vcc_UintVal(tl);
 			vcc_NextToken(tl);
 			ERRCHK(tl);
+		} else if (vcc_IdIs(t_field, expected_response)) {
+			expected_response = vcc_UintVal(tl);
+			vcc_NextToken(tl);
+			ERRCHK(tl);
 		} else {
 			vcc_ErrToken(tl, t_field);
 			vcc_ErrWhere(tl, t_field);
@@ -457,6 +463,7 @@ vcc_ParseProbe(struct tokenlist *tl)
 		Fb(tl, 0, \t\t.initial = %u,\n, initial);
 	else
 		Fb(tl, 0, \t\t.initial = ~0U,\n, initial);
+	Fb(tl, 0, \t\t.expected_response = %u,\n, expected_response);
 	Fb(tl, 0, \t},\n);
 	ExpectErr(tl, '}');
 	vcc_NextToken(tl);
-- 
1.6.3.3

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


Re: hitrate at 1.00 but backend still getting traffic

2009-10-16 Thread Tollef Fog Heen
]] Rob Ayres 

| Also, is there a document detailing what each line of varnishstat
| means?

http://varnish.projects.linpro.no/wiki/StatsExplained is a start, but is
not complete.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Sub-second granularity logs

2009-10-08 Thread Tollef Fog Heen
]] Niall O'Higgins 

|  Which shmrecord are we talking about ?
| 
| I have only started looking through the existing shmlog tags to see
| exactly what corresponds to our needs, but basically we are looking
| for millisecond accuracy at each of these points:
| 
| - When the cache received the request from the client
| - When the request header was forwarded by the cache
| - When the first byte of the response header was recieved back
| - When the end of the response header was received or detected
| - When the first byte of the response body was received or detected
| - When the cache finished sending the response back to the client

At least some of those are already available, as explained in
http://varnish.projects.linpro.no/wiki/Varnishlog

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Cookies being sent back with a cached response

2009-10-08 Thread Tollef Fog Heen
]] Cosimo Streppone 


[...]

| Then looking at varnishlog output, and grepping for Cookie,
| I saw this (unrelated?):
| 
|   90 TxHeader b Cookie: session=bf6ac86feaed6b23bef66a8f44097eac42cf24  
| ...
| 
| How can this ever happen?
| The backends that serve the request never output cookies, and even if they
| did, it would be Set-Cookie: anyway... I'm confused.

This means Varnish is sending a header (TxHeader) to the backend (b),
with a Cookie: session=… set.  Anything received from a backend is
RxHeader and b.

I would guess at you having something, somewhere setting an erronous
domain-wide cookie.  Possibly in Javascript.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Excluding url's from varnishhist

2009-10-08 Thread Tollef Fog Heen
]] Paul Dowman 

| Hi,
| I'm having trouble figuring out how to exclude certain URL's from
| varnishhist. I want to exclude static files, e.g. urls that match a pattern
| like /\.png|\.gif|\.js|\.css|\.ico/ (because these don't cause much load on
| the back-end, I want to see only the requests that would hit my app
| servers).
| 
| I know about the -X regex argument, but it doesn't seem to do what I want.
| Actually I don't really understand what it does, the man page says that it
| excludes log entries that match a pattern, but as far as I can tell it
| doesn't match URL's.
| 
| What's the right way to do this?

There's currently no way to do this, I'm afraid.  varnishtop -b -i TxURL
gives you the URLs, but not any timing information.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish Listen problem ipv6 and ipv4

2009-10-08 Thread Tollef Fog Heen
]] Thomas Fragstein 

Hi,

| when i will start varnish with -A :80 then varnish will only Listen  
| on ipv6.

It's -a, not -A, but I'm guessing you're using that already.

| have anybody a idee who i can win round varnish?

Make sure you don't have anything else listening on ipv4 port 80?  Also,
which platform are you on?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: if-none-match status

2009-10-08 Thread Tollef Fog Heen
]] Joe Williams 

| I am just curious in the status of if-none-match support from the
| commit logs and this mailing list email
| (http://www.mail-archive.com/varnish-misc@projects.linpro.no/msg02738.html)
| it looks like its been committed. As was asked in the
| aforementioned email are there any examples of how to use/configure/etc
| this new feature?

It's used by clients, there are no bits to configure.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Welcome back from vacation!

2009-08-04 Thread Tollef Fog Heen
]] Dag-Erling Smørgrav 

| Poul-Henning Kamp p...@phk.freebsd.dk writes:
|  Dag-Erling Smørgrav d...@des.no writes:
|   Hmm, UK, September...  Why not Cambridge?
|  Because London is where the bloke who stuck his hand up thought he
|  could do it.
| 
| How about putting him in touch with rwatson@ and see if something can be
| arranged?

We already have a place to host it in London, and getting to London is a
bit easier than getting to Cambridge.  Maybe next time. :-)

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Inline C and memory allocation

2009-07-29 Thread Tollef Fog Heen
]] Laurence Rowe 

| I'm not certain if I need to manage the memory of the string that I
| set the header too. It looks like VRT_SetHdr copies the string into
| it's own memory managed space though.

You don't, it's part of the object's workspace.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Thread memory allocation question

2009-07-06 Thread Tollef Fog Heen

]] Poul-Henning Kamp 

| In message 5c056ae2-7207-42f8-9e4b-0f541dc4b...@slide.com, Ken Brownfield 
wri
| tes:
| 
| Would a stack overflow take out the whole child, or just that thread?
| 
| The kernel would try to extend the stack and provided you are not on
| a 32 bit system, it shouldn't ever have a problem with that.

On the other hand, the gain from decreasing the stack size would just be
a bit less book-keeping for the kernel, unless you have overcommit
turned off (which I don't think anybody actually uses), right?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Thread memory allocation question

2009-06-19 Thread Tollef Fog Heen
]] Ken Brownfield 

| When looking at /proc/map info for varnish threads, I'm seeing the  
| following allocations in numbers that essentially match the child count:
| 
| 40111000   8192K rw---[ anon ]

Looks like the default stack size.

| And this at almost double the child count:
| 
| 7f4d5790   1024K rw---[ anon ]

Unsure what this is.

| I noticed some pretty intense memory usage when I had a backend issue  
| and the thread count increased into the hundreds.  Obviously the  
| threads will need memory as they scale, but are these large  
| allocations intentional, and are they tunable (beyond the relatively  
| small workspaces?)

You should be able to tune it using ulimit -s.  If you turn it too low,
things will break, though.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish storage tuning

2009-06-16 Thread Tollef Fog Heen
]] Darryl Dixon - Winterhouse Consulting 

| My testing showed that with purge_url in the VCL, a 'purge record' was
| created every time the rule was struck, and that record never seemed to be
| removed, which meant that memory grew without bound nearly continuously
| (new memory allocated for each new purge record). See the thread I started
| here:
| http://www.mail-archive.com/varnish-misc@projects.linpro.no/msg02520.html

It gets removed when all the objects in the cache older than the purge
either have expired or have been requested.  If your cache is big, this
can obviously take a while.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Newbie question

2009-05-18 Thread Tollef Fog Heen
]] Monah Baki 

| Here is part of the logs, how can I tell it's working?

It doesn't seem to be caching, most likely because the backend sets a
cookie (which means we, by default, don't cache).

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish experience on high request rates

2009-05-18 Thread Tollef Fog Heen
]] Václav Bílek 

| Is there anyone using varnish on such request rates? If yes, what HW do
| you use.

I've had Varnish serve about 20k requests/sec on a single node.  I've
also had it fill a 1Gbit pipe on a single node.  Hardware in both cases
was some reasonably new Xeon system with enough memory to fit your
working set.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: How to let varnishncsa to log the realserver ip

2009-04-14 Thread Tollef Fog Heen
]] 

|  I have a questtion, that is How to let varnishncsa log the backend
|  realserver ip to varnish.log?I search in google,but no result,anyone
|  can help me ?

varnishncsa currently does not support custom log formats, so this is
not possible yet.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: VCL syntax - unset and remove

2009-04-14 Thread Tollef Fog Heen
]] Gaute Amundsen 

| Various usages:
| 
| remove req.http.cookie;
| unset obj.http.Set-Cookie;
| unset resp.http.magicmarker;
| 
| Unset is not in man vcl  (v2.0.3) but remove is.

They are synonyms, but unset is deprecated.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish 2.0.3 consuming excessive memory

2009-04-14 Thread Tollef Fog Heen
]] Darryl Dixon - Winterhouse Consulting 

| My understanding of using 'pass' in vcl_hit is that it causes the object
| to be marked as 'hit for pass' and therefore is uncacheable from that
| point onwards. In fact, pass'ing out of vcl_hit was what I used to do a
| while ago, but it caused that exact behaviour (items would no longer be
| cached by varnish) so I swapped it for purge_url...

You can try setting obj.ttl = 0s and then restart in vcl_hit.  I believe
that should work.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Syntax change : obj.grace

2009-04-02 Thread Tollef Fog Heen
]] Paras Fadte 

| Is obj.grace now changed to beresp.grace for the code in varnish
| trunk ? 

Yes.

| Also is it necessary to have return  in the .vcl confg file
| ? Example return(pass) or just pass would be sufficient ?

«pass» alone is still supported, but the recommended syntax is to use an
explicit return.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: uptime not available to nagios plugin?

2009-03-30 Thread Tollef Fog Heen
]] Sascha Ottolski 

| bug or feature? The nagios plugin seems not to be able to extract the 
| uptime:

Bug.  Fixed now, thanks.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Caching ScriptResource.axd files-

2009-03-30 Thread Tollef Fog Heen
]] Abu Syed Islam 

| I am very new to Varnish and like to know how I could cache
| ScriptResource.axd files? The browsers making several call to this file
| per http page. But each call to ScriptResource.axd file generates
| different query strings-

Well, I don't know what that .axd file is, but if the content varies
with the query string, you can't really get rid of the query string.
Else, you could do something like

  set req.url = regsub(req.url, \?.*, )

in vcl_recv to strip the complete query string.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Unknown variable 'obj.prefetch'

2009-02-27 Thread Tollef Fog Heen
]] Paras Fadte 

| I downloaded varnish from trunk(Revision3832) and after installation
| when trying to start it , it gives error  saying Unknown variable
| 'obj.prefetch'  which is defined in varnish.vcl file . It worked fine
| for 2.0.2  Has obj.prefetch been removed ?

Yes.  It was never used for anything.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: How to rotate varnish log files with cronolog?

2009-02-24 Thread Tollef Fog Heen
]] 刘开玄 

| Does Varnish support cronolog? I have searched over Google and the
| archived maillist for a whole day, but find nothing useful. My Varnish
| is the lastest 2.0.3.

I'm not sure how cronolog works, but it seems like it takes log files
from stdin and handles the rotation automatically.

Just use «/opt/varnish203/bin/varnishncsa |/usr/bin/cronolog 
/logs/mysite_access_%Y%m%d.log»
and you should be fine.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: ESI include: src, alt, onerror weirdness

2009-02-12 Thread Tollef Fog Heen
]] Florian Gilcher 

| So, I am beginning to wonder on how esi:include is implemented in  
| varnish or what I am doing wrong. Because - granted - the ESI  
| specification could be interpreted to include the element without  
| giving much thought on what the returned entity actually represents.  
| Then this would be the correct behaviour, as the backend is obviously  
| responding.

We don't support onerror, nor alt at the moment.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: running varnish-2.0.2 on Sun

2009-02-12 Thread Tollef Fog Heen
]] Rob Ayres 

| Does anyone have an idea what has caused this?

Not really, no.  I'm going to get a buildbot slave going on Solaris so
we'll hopefully be able to avoid such bugs in the future.  If you have
found a solution, patches are more than welcome.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Configuration question about a domain list for a http.req.host comparaison

2009-02-10 Thread Tollef Fog Heen
]] Damien Desmarets 

| I have 1 question for you. I haven't found the response in the
| documentation/wiki. I think you have a big job to wrtie a good
| documentation ... the current is really poor !

If you want to help out with writing docs or suggest weak points, you
are more than welcome.

| Is it possible to do this in VCL origin configuration?

Not at the moment, no.  What I would suggest is you write a small script
in your favourite language that generates the VCL for you.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Disconnection time

2009-02-04 Thread Tollef Fog Heen
]] Justin Finkelstein 

| I've been using varnish for a little while now and have noticed
| behaviour that I'd like to alter.
| When I telnet into varnish to do a manual GET and I hesitate for a
| couple of seconds, it closes the connection.
| 
| Is there a way that this delay can be configured or altered?

Set sess_timeout to something greater than 5 (which is the default).

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Cookie Expiring Date

2009-02-03 Thread Tollef Fog Heen
]] Steven Tönsing 

| Hi everyone,
| I'm just trying to get the vanish 2.0.2 running in front of a cms. The  
| problem is, the user need to be passed to the backend if the admin  
| cookie is set and valid.
| Therefore i'm wondering if there is a way to find out if the expiring  
| date of a cookie is in the future or in the past.

If it has expired, the client just won't send it, so just check
req.http.cookie for the relevant cookie and you'll be fine.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Backend connections failures

2009-01-30 Thread Tollef Fog Heen
]] M L 

| have any way to setup varnish to retry when backend connections failures?
| can i modify varnish to backend server connect timeout ?   .connect_timeout
| = 1s; ?

Not at the moment, no.  There's some interest in getting «restart» from
vcl_error working which would allow you to do this, but I don't think
anybody has actually done the work necessary.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: worker threads limited

2009-01-30 Thread Tollef Fog Heen
]] Abhishek Singh 

| can any please tell me what is worker threads limited , is it number of
| max connection for varnish. I am confused with this parameter because i have
| two servers with same OS and HW but when i am starting varnish on both the
| server then on one server i am getting vale  0 for worker threads limited
| and on another server this value is 756 while i am starting varnishd with
| following command.

You are running into the maximum number of threads allowed.  As long as
you don't have dropped connections too, this should not be a problem.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: 2.1 plans

2009-01-12 Thread Tollef Fog Heen
]] Ingvar Hagelund 

| * Tollef Fog Heen
|  a short while before Christmas, I wrote up a small document pointing to
|  what I would like to get into 2.1 (...)
|  Varnish 2.1 release plan
|  (...)
| 
| Will 2.1 be backwards compatible with vcl and configuration settings
| from 2.0?
|
| ie, will I be able to just upgrade a binary pre-built package and
| restart the server?

Yes, I don't see any need to break backwards compatibility for 2.1.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: flushing cache doesn't seem to make varnish know about less

2009-01-12 Thread Tollef Fog Heen
]] Timothy Ball 

| a programming error caused varnish to think there were billions of
| pages it had to know about. bug is quashed but varnish doesn't seem to
| know
| 
| # this is a line from top
|  3596  0.2 28.3g  28g 3808  256  57m 1916   120 S  20   00 varnishd
| # this is a line from ps auxwww
| nobody3596  0.1  0.1 29681936 3968 ?   Sl   04:24   0:00
| /opt/varnish/sbin/varnishd -a 10.13.37.1:80 -h classic -f
| /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -w 1,500,20
| 
| i tried doing url.purge .* and url.purge . to no avail.

url.purge does not actively go out and remove the objects; they'll be
picked up by the LRU cleaner after a while.

If you need to recover the memory, you can do a quick «stop» and then
«start» in the CLI, but this will naturally nuke your complete cache, so
it can't be used if you just wanted to remove some bits.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: 2.1 plans

2009-01-09 Thread Tollef Fog Heen
]] Michael S. Fischer 

| What about CARP-like cache routing (i.e., where multiple cache servers
| themselves are hash buckets)?  This would go a LONG way towards
| scalability.

http://varnish.projects.linpro.no/wiki/PostTwoShoppingList second item
sounds like what you want?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Dropping some mailing lists?

2009-01-09 Thread Tollef Fog Heen

(Please reply only to -misc so we don't end up with a zillion copies of
this all over the lists.)

Hi,

we currently have very many mailing lists:

varnish-announceRelease announcements and other important news.
varnish-bugsBug reports go here.
varnish-commit  Commit messages go here.
varnish-dev Discussions regarding Varnish development.
varnish-distDiscussions regarding Varnish releases and packaging
varnish-miscDiscussions on miscellaneous topics relating to Varnish
varnish-testFor testing purposes.

At the same time, we don't have that much traffic, so having a total of
seven mailing lists seem a bit excessive.

I suggest we get rid of -dev, -dist and -test.  -announce and -misc will
be kept as discussion lists.  -bugs and -commit will continue as
trac-to-email lists (i.e. not discussion lists).

Comments?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish keep-alive problem

2009-01-06 Thread Tollef Fog Heen
]] wangqidi 

| Varnish is a very good web accelerator, and i find it support KeepAlive.
| The default keep-alive is on. I want to turn off the keep-alive, but i don't 
know how to do it.
| Please tell me how to turn off the keep-alive.

I don't believe that's possible out of the box.  Why do you want to turn
off keepalive?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: next release?

2009-01-06 Thread Tollef Fog Heen
]] Sascha Ottolski 

| I'm curious when the next stable (minor) release is planned. I'm 
| especially interested in
|
| Date: 2008-11-14 01:19:33 +0100 (Fri, 14 Nov 2008)
| New Revision: 3390

[...]

| which seem to be in the trunk, but didn't made it into 2.0.2.

I don't think I'll let 3390 into 2.0.3.  It might be safe, but I would
like to play it conservative.

| If no release is planned, which trunk revision could be recommended for 
| productive environment?

Just cherry-picking 3390 should work, it seems fairly self-contained.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: caching everything incl. 403?

2008-12-16 Thread Tollef Fog Heen
]] Loesche, Lukas, scoyo 

| Also, what criteria has to be meet for if(obj.cacheable) to be true?

from bin/varnishd/rfc2616.c:

switch (sp-obj-response) {
case 200: /* OK */
case 203: /* Non-Authoritative Information */
case 300: /* Multiple Choices */
case 301: /* Moved Permanently */
case 302: /* Moved Temporarily */
case 410: /* Gone */
case 404: /* Not Found */
sp-obj-cacheable = 1;
[...]
default:
sp-obj-cacheable = 0;

In other words, by default it'll be marked as non-cacheable. You should
be able to do something like:

if (obj.status == 403) {
   set obj.cacheable = 1;
}

in your VCL.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Unexplainable 503 error

2008-12-16 Thread Tollef Fog Heen
]] Karl Bernard 

| I have been trying to upgrade my production instance of Varnish
| 1.1.2. to 2.01, but I have a problem that I can't figure out in the
| new version.

I recommend going to 2.0.2, not 2.0.1

|9 VCL_call c miss fetch
|9 Backend  c 32 default default
| *9 VCL_call c error deliver*

This means it fails when fetching the object.  I suspect this is a
limitation in the number of connections to the backend or something like
that.  Maybe wireshark or tcpdump will be able to shed more light on
what's going on here.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: small free smf

2008-12-09 Thread Tollef Fog Heen
]] Paras Fadte 

| What does small free smf shown by varnishstat represent ? I see
| substantial increase at times and the CPU usage increases.

It's just showing you that it is removing objects and putting memory
pages back on the «free» list.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish performance tests

2008-12-08 Thread Tollef Fog Heen
]] Rebert Luc 

|  In our studies we have a project which consists in testing the
| performance of Varnish in order to make a comparative with and without
| the proxy cache.
|  Does anyone know which utilities to employ ? (knowing that the aim
| is to justify our tests)

http://www.web-cache.com/benchmarking.html has some pointers.  I've had
interesting numbers come out of polygraph.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish2.0.2 on Suse 10.3

2008-12-01 Thread Tollef Fog Heen
]] Paras Fadte 

| child (28673) Started
| Pushing vcls failed: Internal error: No VCL_conf symbol

It seems to fail to load the configuration, probably because the .so
with the configuration ends up stripped.  Why that happens, I have no
idea.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Overflowed work requests

2008-11-24 Thread Tollef Fog Heen
]] Michael 

| Hi,
| 
| PF What does overflowed work requests in varnishstat signify ? If this
| PF number is large is it a bad sign ?
| 
| I have similar problem. overflowed work requests and dropped work
| requests is too large.

You might want to increase the maximum number of threads; look at the
thread_pool_max parameter.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Round robin mode

2008-11-24 Thread Tollef Fog Heen
]] Paras Fadte 

| In varnish , when a director is specified of type round-robin , it
| will skip an unhealthy backend , till it is not back healthy, is that
| correct ? varnish version is 2.0.2

Yes, both the random and round-robin directors skip unhealthy backends.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: round-robin director

2008-11-20 Thread Tollef Fog Heen
]] Michael Moyle 

| Is it possible that the fix to the random director in this release
| fixed round-robin as well?

No, it only affected the random director.

| In addition I will note that round-robin load balance selects
| different hosts on our top page as desired. After a session cookie is
| issued it stuck with one host (sticky session) which is what we want.
| I could not find any varnish docs on this and was concerned sticky
| session was not implemented. I even found some posts on this list
| suggesting that it was not there and would need to be implemented in
| the vcl. However it appears to work fine out of the box. Can you (or
| anyone) confirm that sticky session is implemented?

I am fairly sure we have not implemented sticky sessions, so I am not
sure why you are seeing this behaviour.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish2.0.2 on Suse 10.3

2008-11-20 Thread Tollef Fog Heen
]] Paras Fadte 

| I installed the same version on openSUSE 10.1 (X86-64) and it runs
| fine .What could be the issue?

Do you have a compiler installed?  What happens if you run varnishd with
the -C flag?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: ESI works in IE6 curl, but not in FF, Opera, Konqueror

2008-11-06 Thread Tollef Fog Heen
]] Torstein Krause Johansen 

Hi Torstein,

it's been a while, we should meet up one of those days. :-)

| It seems that the Accept-encoding header the client sends (or doesn't 
| send in curl's case) to Varnish is the crucial bit, but of course I'm 
| not sure. It _does_ influence the curl result though, setting it to the 
| same as what Iceweasel sends to Varnish messes up the results (only 
| garble comes back).

I'd start by turning off Content-Encoding: gzip and see if that helps.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Release policy

2008-11-06 Thread Tollef Fog Heen
]] Bryan Fullerton 

| Just wondering, what is the release policy is for point releases?

Basically «when there's a need», or we have collected a small set of
fixes that we think should go into a point release.  Unless we stumble
across security or other critical bugs, I'm thinking no more often than
once a month and not less than every two or three months is about right.

Feedback on this is welcome, whether you feel this is about the right
pace, too often or too seldom.

I'm looking at cutting a 2.0.2 early next week, so unless you need the
fix urgently, I'd advise you to wait for that.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: varnish 2.0.1 truncates pre-created cache file?

2008-10-21 Thread Tollef Fog Heen
]] Sascha Ottolski 

| bug or feature? With the new version, my cache file gets shrunk. I made 
| it with dd with a size of ~259 GB, but after starting varnishd, only 
| about 119 GB are left. I don't give a size parameter when starting, as 
| in
| 
| -s file,/var/cache/varnish/store.bin
| 
| which worked as expected with older releases.

I would guess at you running into us using 50% of the available space on
the file system by default.  If we don't use the existing size, I'd
argue it's a bug, so please file one.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Remove only selected cookies from requests?

2008-10-17 Thread Tollef Fog Heen
]] Espen Braastad 

| On 2008-10-07 15:49, Espen Braastad [EMAIL PROTECTED] wrote:
| 
| The question:
| Is it possible to match cookie names in each request to a regexp, and
| remove only specified cookies? Other cookies must not be removed.
| 
| The answer:
| Yes. The following two lines in vcl_recv will remove the cookie named
| baz only:

I've added this to the wiki,
http://varnish.projects.linpro.no/wiki/VCLExampleRemovingSomeCookies

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Cookie issue

2008-10-06 Thread Tollef Fog Heen
]] Morten Bekkelund 

| Tollef Fog Heen wrote:
|
|  if (req.url ~ ^/admin) {
| pass;
|  }
| 
|  in vcl_recv, so I presume that's not the problem you are running into?
|
| Well, I've tried that. That passes the single request to ^/admin, but
| does a lookup on every other request since the stuff under admin uses
| a lot of stuff in other paths. So it's a bit tricky :)

From the sound of it, it sounds like you are doing something very wrong
here; why do you want to do pass on other bits than the page itself?  I
presume any other content would be images, CSS and so on?  What is the
problem you are trying to solve?

If you really want to go your route, you could do something like setting
a cookie on /admin and then checking for that in vcl_recv and if so
doing pass.  It sounds completely wrong and quite error-prone to me,
though.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Cookie issue

2008-10-03 Thread Tollef Fog Heen
]] Morten Bekkelund 

| I'm looking for a good approach to force a lookup when these cookies
| are set, but still also force a pass when other cookies are set OR
| even do a pass for the entire session when the req.url matches
| ^/admin ...for instance.

You probably want to do regex matches against req.http.cookie to ensure
you only cache for particular pages.  I'd also recommend reading through
http://varnish.projects.linpro.no/wiki/VCLExampleCacheCookies if you
haven't.

Doing pass on ^/admin should be something like

if (req.url ~ ^/admin) {
   pass;
}

in vcl_recv, so I presume that's not the problem you are running into?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: on linux: only one cpu in use?

2008-09-29 Thread Tollef Fog Heen
]] Sascha Ottolski 

| Am Montag 15 September 2008 16:16:33 schrieb Tollef Fog Heen:
|  ]] Sascha Ottolski
| 
|  | it's debian etch with the stock 2.6.18 kernel. performance is ok,
|  | beside the fact that the load climbs up when the cache is about
|  | 40-50 % full (with a 517GB cache file); below 40 % the load stays
|  | below 3, but after that level it rises to over 7 and even 10 at
|  | peak times. the response times are still good, though.
| 
|  Is this with the mmap or the malloc backend?
| 
| well, as the man page says about malloc Not recommended for production 
| use., I use the file backend :-)

Indeed.  Fixed that just now.  It seems like newer kernels has some
performance problems we are tickling.  I haven't had the time to track
down which commit breaks us, but it's fairly noticeable on busy sites.

| In case it matters, it's with trunk r2640.

This is fairly old, though.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Custom varnishncsa Log Format?

2008-09-29 Thread Tollef Fog Heen
]] Loesche, Lukas, ZD-Scoyo 

| I got a question regarding custom ncsa log formats. Are they possible?

Not at the moment.

| We got varnish behind a loadbalancer. The loadbalancer sets the
| X-Forwarded-For Header. When processing logs using varnishncsa I'd like to
| see the content of X-Forwarded-For as remote addr, instead of the
| loadbalancer's source IP.

[...]

| Is there an easy way to achieve this, without having to write a custom
| varnishlog parser that generates ncsa output?

I added the -f switch to varnishncsa in commit 3237 which allows you to
do this.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: when a backend in a director is stopped varnish is no longer responding ( 2.0 beta1)

2008-09-22 Thread Tollef Fog Heen
]] jean-marc pouchoulon 


[...]

| When I stopped one of the backend, varnish is no longer responding.
| I can see clearly in varnishlog  that the backend regards to ill state 
| but the failover is not working.

This is already fixed in SVN; A new beta is happening shortly, so please
use that when it arrives.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: on linux: only one cpu in use?

2008-09-15 Thread Tollef Fog Heen
]] Sascha Ottolski 

| it's debian etch with the stock 2.6.18 kernel. performance is ok, beside 
| the fact that the load climbs up when the cache is about 40-50 % full 
| (with a 517GB cache file); below 40 % the load stays below 3, but after 
| that level it rises to over 7 and even 10 at peak times. the response 
| times are still good, though.

Is this with the mmap or the malloc backend?

| we just installed irqbalance to see if this makes a difference. after 
| some minutes (without restarting varnish), the picture according to top 
| to top is, that 3 out of 4 core do most of the I/O:

Unsure why this happens.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


  1   2   >