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

Denis N. Antonioli webtest@lists.canoo.com
Wed, 19 Oct 2005 23:32:52 +0200


I'm pretty sure that my webapp doesn't explicitly set a timeout, yet  
webtesting it suffers from an increasing memory consumption.

Is there a default timeout?
Would it be possible for webtest to set a default short timeout value?

I think that would help many webtest users ;-)

Best
     dna

On 19 oct. 05, at 10:15, Marc Guillemot wrote:

> 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
>>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

-- 
Failure is not an option. It comes bundled with your Microsoft product.
   -- Ferenc Mantfeld