[Yum-devel] [urlgrabber] keepalive broken

Florian La Roche laroche at redhat.com
Tue Dec 12 21:17:01 UTC 2006


On Thu, Dec 07, 2006 at 05:20:44PM -0700, Michael Stenner wrote:
> On Thu, Dec 07, 2006 at 07:01:17PM -0500, James Bowes wrote:
> > >If you're not seeing this, then I'd appreciate your help figuring out
> > >what the hell is going on with m2crypto.
> > 
> > Yeah, I've never seen that.
> 
> That's what I was afraid of :)
> 
> > Please do send me what you have. I'll see if I can get it to blow up as 
> > well.
> 
> woo-hoo, I finally have an excuse to do "make daily"!
> 
> http://bird.ece.arizona.edu/~mstenner/urlgrabber-20061207.tar.gz
> 
> Also, check out scripts/urlgrabber.  It's all new and pretty cool,
> although mostly as a debugging tool.  It will work for older
> urlgrabber's, too.  Just do:
> 
>   export PYTHONPATH=.
>   pythonX.X scripts/urlgrabber -D http://foo.com/index.html


Hello Michael,

the following script will also leak filedescriptors, so it will
also fail once the usual limit of 1024 fd's is reached and not
just have keepalive not working:


#!/usr/bin/python
import urlgrabber, time
for i in xrange(2000):
    fd = urlgrabber.urlopen("http://127.0.0.1/mirror/K",
        timeout=10.0, retry=3, keepalive=1)
    fd.read(10)
    fd.close()


regards,

Florian La Roche




More information about the Yum-devel mailing list