Mailing List Archive

Problems with the cache
Im trying to get varnish running smoothly on my server with apache on
it. Unforunately Im having some problems to get the caching thing
working. I have set varnishd to use default.vcl on a Debian 4.0 etch OS.
it starts up without any problem but doesn't cache anything.

Also the varnishlog doesn't seem to log anything. I'm having it running
as a daemon, it's writing the log to /var/log/varnish/varnish.log but
that file is empty. Varnishstat doesn't update itself when using vcl,
only when using "-b localhost:8080" as a parameter to varnishd.

Im using all default config files, except that I have edited the backend
in default.vcl and in /etc/default/varnish .

However, if I use the "-b" parameter woith varnishd, I could get
varnishd to work but nothing is cached. Alot of objects are fetched but
nothing is parsed out to the client. It just fetches it from the backend
server over and over again.

As you see, i have alot of problems. It became a big mess after some
tweaking and now am stuck with alooot of problems :(

/ Erik
Problems with the cache [ In reply to ]
Erik Torlen skrev:
> Im trying to get varnish running smoothly on my server with apache on
> it. Unforunately Im having some problems to get the caching thing
> working. I have set varnishd to use default.vcl on a Debian 4.0 etch OS.
> it starts up without any problem but doesn't cache anything.

The default configuration will not cache if your are setting cookies or
if your clients are sending cookies to Varnish. I think this is covered
in the FAQ.

> Also the varnishlog doesn't seem to log anything.

Does it log anything when you're just running it on the command line -
without any options?


Per.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://projects.linpro.no/pipermail/varnish-misc/attachments/20070911/ec7551ad/attachment.pgp
Problems with the cache [ In reply to ]
(Please stay on the mailing list.)

Erik Torlen skrev:
>
>> The default configuration will not cache if your are setting cookies or
>> if your clients are sending cookies to Varnish. I think this is covered
>> in the FAQ.
>
> I just made a simple index.html with two example jpeg pics. No extra
> header settings or cookies. I also tried to add some example code from
> the manual page to the default.vcl where they showed how to cache
> cookies. Neither did that work.
>
>> Does it log anything when you're just running it on the command line -
>> without any options?
>>
> Well, if I use the default.vcl it doesn't show me anything, but if I use
> the "-b" parameter it displays some "ping" and "pong" messages and alot
> of other stuff if I open the site in the browser. But, as I said, this
> is with the "-b" parameter. With the default.vcl, it is totally
> quiet :(


Are you sure you've set up varnish as proxy?
* What port is varnish binding to?
* what port is your backend running on?
* How are you accessing the site?



Per.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://projects.linpro.no/pipermail/varnish-misc/attachments/20070912/c4b4e6cc/attachment.pgp
Problems with the cache [ In reply to ]
>> Are you sure you've set up varnish as proxy?
>> * What port is varnish binding to?
>> * what port is your backend running on?
>> * How are you accessing the site?

Im sure, I have proxy set to listen on port 80 and my apache2 server on port 8080. I can access my site without any problem on both port 80, through the proxy, and on port 8080.

Erik