[ptt-users] Re: TestMaker memory problems
Carl Herder
carl_herder at yahoo.com
Wed Jan 3 10:38:04 PST 2007
My thoughts:
1. The initial URL is appended to the list, whether or not we indicate to follow redirects, every time connect() is called. We should use this list only if we are following redirects.
2. It might be best to separate the debugging function from simply following redirects. Debugging is generally for short runs. We might want to run a workload for a long period that includes redirection.
3. This may be an unfounded concern, but the way clerURLlist() is coded MAY cause a memory leak, by leaving a lot of Vectors in the heap for GC to take care of. I suggest something like this:
public void clearURLlist()
{
if (URLlist != null) {
URLlist.removeAllElements();
} else {
URLlist = new Vector();
}
}
4. Suggestion: Could the URLlist be processed and reinitialized as soon as we leave the redirection while loop in connect()?
Thanks,
Carl
Frank Cohen <fcohen at pushtotest.com> wrote:
Hmmm... the URLlist was originally intended to help users debug Web
services that use HTTP redirect commands. The idea is getURLlist()
would show a list of the URLs that were redirected after an
HTTPProtocol connect() method.
I think the best solution to avoid the Out Of Memory problems in
XSTest is to modify agentbase.py to call the HTTPProtocol clearURLlist
() method in the config() method. That way the list is reset each
time the test's setUp() method is called.
This is an easy change so I'll add it to the TestMaker 4.4.1
maintenance release. Please let me know your comments, feedback, ideas.
Thanks Carl for pointing out this problem.
-Frank
On Dec 28, 2006, at 10:52 AM, Carl Herder wrote:
> Long running xstest loads run out of memory. It is not technically
> a memory leak. In com.pushtotest.tool.protocolhandler.HTTPprotocol
> there is a Vector URLlist that grows constantly during the run. The
> connect() method appends the URL for every request to this Vector.
> An instance is created for each CVU. As far as I can see, this list
> is not used for anything (HTTPSprotocol uses it for redirected
> URLs, which are printed out at the end).
>
> I commented out
>
> URLlist.addElement( con.getURL() );
>
> and the memory problem goes away. I have been running now for 18
> hours, with 200 CVUs, and heap memory is stable.
>
> Plug for the Wily Leakhunter tool (disclosure--I work for the
> company), which pointed me immediately to the offending List.
>
> Carl
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
_______________________________________________
Users mailing list
Users at lists.pushtotest.com
http://lists.pushtotest.com/mailman/listinfo/users
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cake.pushtotest.com/pipermail/users/attachments/20070103/01bb77d6/attachment.htm
More information about the Users
mailing list