Mar 7, 2012, 7:14 PM
Post #1 of 3
Serious memory leak using LWP
If I run the following code, it results in a memory leak. I monitor some internal websites, and after a few hours or days,the memory can become outrageous, sometimes running the machine out of the memory! I didn't put in a sleep or delay just so that you can see the problem, but when you run this code you'll see the memory usage just go insane. You can change the url to some bogus website without a properly formatted address, like $url="lksjfdlsjf" and you'll see the memory leak happen as well, and much quicker.
Is there a way to resolve this issue?
Thanks in advance!
$url = "http://cnn.com";
$content = get $url;
$content = parse_html($content)->format;