[Webtest] Re: Memory issue (problem in htmlunit)

Marc Guillemot webtest@lists.canoo.com
Wed, 19 Oct 2005 10:15:55 +0200


As explained on htmlunit-dev mailing list, I see this only as a 
temporary workaround with drawbacks as long as htmlunit hasn't been 
improved to correctly clear all these timeouts.

Marc.

Dierk Koenig wrote:
> cool. thanks for posting
> Mittie
> 
> 
>>-----Original Message-----
>>From: webtest-admin@lists.canoo.com
>>[mailto:webtest-admin@lists.canoo.com]On Behalf Of about280@about280.com
>>Sent: Mittwoch, 19. Oktober 2005 5:47
>>To: webtest@gate2.canoo.com
>>Subject: [Webtest] Re: Memory issue (problem in htmlunit)
>>
>>
>>The problem we had with htmlunit turned out to be caused by our usage of
>>setTimeout in javascript.
>>
>>What was happening is that we were using setTimeout to end the session, so
>>setTimeout was being called with an argument of 900000ms (15 minutes).
>>This meant that canoo test was being kept in memory for 15 minutes, even
>>though the test itself had long ago finished. This was why we were running
>>out of memory, as the tests themselves were never removed from memory.
>>
>>We found a way around it, by setting the user-agent string in canoo
>>webtest to have the word canoo in it. Then when we call setTimeout, we
>>check the user agent string, and if canoo is there we make setTimeout to
>>250ms, instead of 900000ms. It's a bit of a hack but it works.
>>
>>_______________________________________________
>>WebTest mailing list
>>WebTest@lists.canoo.com
>>http://lists.canoo.com/mailman/listinfo/webtest
> 
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>