Mailing List Archive

varnishtop hangs
I do the following in varnishtop: varnishtop -i TxURL

after some request it hangs and from strace I get:

rt_sigaction(SIGTSTP, {SIG_IGN}, {0xb7f86fe0, [], SA_RESTART}, 8) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
rt_sigaction(SIGTSTP, {0xb7f86fe0, [], SA_RESTART}, NULL, 8) = 0
gettimeofday({1199697921, 208862}, NULL) = 0
select(1, [0], NULL, NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1199697922, 208654}, NULL) = 0
time(NULL) = 1199697922
rt_sigaction(SIGTSTP, {SIG_IGN}, {0xb7f86fe0, [], SA_RESTART}, 8) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
rt_sigaction(SIGTSTP, {0xb7f86fe0, [], SA_RESTART}, NULL, 8) = 0
gettimeofday({1199697922, 208821}, NULL) = 0
select(1, [0], NULL, NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1199697923, 208618}, NULL) = 0
time(NULL) = 1199697923
rt_sigaction(SIGTSTP, {SIG_IGN}, {0xb7f86fe0, [], SA_RESTART}, 8) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
rt_sigaction(SIGTSTP, {0xb7f86fe0, [], SA_RESTART}, NULL, 8) = 0
gettimeofday({1199697923, 208781}, NULL) = 0
select(1, [0], NULL, NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1199697924, 208580}, NULL) = 0
time(NULL) = 1199697924
rt_sigaction(SIGTSTP, {SIG_IGN}, {0xb7f86fe0, [], SA_RESTART}, 8) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
rt_sigaction(SIGTSTP, {0xb7f86fe0, [], SA_RESTART}, NULL, 8) = 0
gettimeofday({1199697924, 208748}, NULL) = 0
select(1, [0], NULL, NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1199697925, 208553}, NULL) = 0
time(NULL) = 1199697925
rt_sigaction(SIGTSTP, {SIG_IGN}, {0xb7f86fe0, [], SA_RESTART}, 8) = 0
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
write(1, "\01013\33[3;6H1.00 TxURL /\33[4;6H1"..., 584) = 584
rt_sigaction(SIGTSTP, {0xb7f86fe0, [], SA_RESTART}, NULL, 8) = 0
gettimeofday({1199697925, 209013}, NULL) = 0
select(1, [0], NULL, NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1199697926, 224518}, NULL) = 0
futex(0x804af08, FUTEX_WAIT, 2, NULL

# varnishd -V
varnishd (varnish-1.1.2)
Copyright (c) 2006-2007 Linpro AS / Verdens Gang AS

Running ubuntu
# uname -a
Linux web1 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686 GNU/Linux

Im using varnish from the .tar.gz package on SF.

Thank you
Erik
varnishtop hangs [ In reply to ]
In message <vx8f8g4j4c483hq.070120081034 at torlen.net>, Erik writes:

>I do the following in varnishtop: varnishtop -i TxURL

The trace doesn't look wrong as far as I can see.

Your problem may simply be that there isn't enough backend traffic
for varnishtop to have anything to show.

Or possibly, that varnishtop is looking at the wrong shared memory
area if you have multiple varnish instances (remember to specify
the same instance name).

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
varnishtop hangs [ In reply to ]
>I do the following in varnishtop: varnishtop -i TxURL

The trace doesn't look wrong as far as I can see.

Your problem may simply be that there isn't enough backend traffic
for varnishtop to have anything to show.

Or possibly, that varnishtop is looking at the wrong shared memory
area if you have multiple varnish instances (remember to specify
the same instance name).

---------------------------------
I'm making alot of requests and the varnishtop shows the correct stats but after a while with some certain tags (e.g TxURL) it just hangs. I cannot make e Ctrl+C or anything, simply dead.

Im running only one varnishinstance. Can I provide some more info?

BTW. This subject: "hash.url missing in varnish 1.1.2", do you have an answer of that one?

Regards
Erik
varnishtop hangs [ In reply to ]
In message <i2szdwej8zo3pz5.070120081317 at torlen.net>, Erik writes:

>I'm making alot of requests and the varnishtop shows the correct=
> stats but after a while with some certain tags (e.g TxURL) it=
> just hangs. I cannot make e Ctrl+C or anything, simply dead.

Hmm, I wonder if your shmlog segment is overrun too fast. In that
case all the shmlog tailing programs can get confused.

How much traffic does your server take ?

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
varnishtop hangs [ In reply to ]
Its not near an overload when it hangs. I do some requests against it
and *poff*, varnishtop hangs and
I can't even close it with ctrl+c. If you have any requests on some more
info am more then glad to help.
Cheers
Erik

Poul-Henning Kamp skrev:
> In message <i2szdwej8zo3pz5.070120081317 at torlen.net>, Erik writes:
>
>
>> I'm making alot of requests and the varnishtop shows the correct=
>> stats but after a while with some certain tags (e.g TxURL) it=
>> just hangs. I cannot make e Ctrl+C or anything, simply dead.
>>
>
> Hmm, I wonder if your shmlog segment is overrun too fast. In that
> case all the shmlog tailing programs can get confused.
>
> How much traffic does your server take ?
>
>
varnishtop hangs [ In reply to ]
Hello All,

I am running varnish and lighttpd. lighttpd webserver runs on port 8080 and
on localhost. Varnish runs on port 80 and on the public ip. While checking
the access.log of lighttpd. The webrequests are shown to come from 127.0.0.1.
I would like to know wht configruation changes are required in varnish to
log the remote client ip in access.log.

Kevin

On Jan 8, 2008 10:21 PM, Erik Torlen <duja at torlen.net> wrote:

> Its not near an overload when it hangs. I do some requests against it
> and *poff*, varnishtop hangs and
> I can't even close it with ctrl+c. If you have any requests on some more
> info am more then glad to help.
> Cheers
> Erik
>
> Poul-Henning Kamp skrev:
> > In message <i2szdwej8zo3pz5.070120081317 at torlen.net>, Erik writes:
> >
> >
> >> I'm making alot of requests and the varnishtop shows the correct=
> >> stats but after a while with some certain tags (e.g TxURL) it=
> >> just hangs. I cannot make e Ctrl+C or anything, simply dead.
> >>
> >
> > Hmm, I wonder if your shmlog segment is overrun too fast. In that
> > case all the shmlog tailing programs can get confused.
> >
> > How much traffic does your server take ?
> >
> >
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20080109/f9147e92/attachment.htm
varnishtop hangs [ In reply to ]
In message <1c752e950801090225q7fe10073h134ab302d59548b9 at mail.gmail.com>, "kevi
n fernandes" writes:
>------=_Part_44100_26483652.1199874321414
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline
>
>Hello All,
>
>I am running varnish and lighttpd. lighttpd webserver runs on port 8080 and
>on localhost. Varnish runs on port 80 and on the public ip. While checking
>the access.log of lighttpd. The webrequests are shown to come from 127.0.0.1.
>I would like to know wht configruation changes are required in varnish to
>log the remote client ip in access.log.

Varnish sends a header "X-Forwarded-for:" to lightttpd which it should
use in the logfile. You need to check the lighttpd config how to enable that.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
varnishtop hangs [ In reply to ]
<snip>
>>and on localhost. Varnish runs on port 80 and on the public ip. While
>>checking the access.log of lighttpd. The webrequests are shown to come
from 127.0.0.1.
>>I would like to know wht configruation changes are required in varnish

>>to log the remote client ip in access.log.

>Varnish sends a header "X-Forwarded-for:" to lightttpd which it should
use in the logfile. You need
>to check the lighttpd config how to enable that.

In your lighttpd.conf, add:

accesslog.format = "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b
\"%{Referer}i\" \"%{User-Agent}i\""

http://fak3r.com/2008/01/09/howto-log-the-users-ip-not-the-proxys-in-lig
httpd-access-log/

Thanks for bringing this up, I finally got around to fixing it!

P

If you are not the intended recipient of this message (including attachments), or if you have received this message in error, immediately notify us and delete it and any attachments. If you no longer wish to receive e-mail from Edward Jones, please send this request to messages at edwardjones.com. You must include the e-mail address that you wish not to receive e-mail communications. For important additional information related to this e-mail, visit www.edwardjones.com/US_email_disclosure
varnishtop hangs [ In reply to ]
You can use mod_extforward to get real IP address:

http://trac.lighttpd.net/trac/wiki/Docs/ModExtForward

On Wed, Jan 09, 2008 at 03:55:21PM +0530, kevin fernandes wrote:
> Hello All,
>
> I am running varnish and lighttpd. lighttpd webserver runs on port 8080 and
> on localhost. Varnish runs on port 80 and on the public ip. While checking
> the access.log of lighttpd. The webrequests are shown to come from 127.0.0.1.
> I would like to know wht configruation changes are required in varnish to
> log the remote client ip in access.log.
>
> Kevin

--
* Gea-Suan Lin http://blog.gslin.org/
* If you cannot convince them, confuse them. -- Harry S Truman