Hi deepak

I did what you suggested to me ie make the call directly from my custom
JavaSampler and it really works well. The memory is stable so now I can
increase the number of threads without the fear of crashing JMeter because
of the memory limitation. I was stupid to not think of that solution earlier
but that's why those forums exist. So Thank you.
Regards

Tomada


Deepak Shetty wrote:
> 
> Hi
> i find it hard to believe that the problem is in HttpSampler (because then
> this should be reported quite often). Would it be possible to post your
> entire test?(or a reduced form that shows the error?)
> Another thing to try out would be to see if this problem is present in the
> HttpClient -HttpSampler?
> Im not sure how to extend the HttpSampler , but you can always make the
> call
> from your custom JavaSampler..
> regards
> deepak
> 
> On Sun, Jun 21, 2009 at 9:25 PM, tomada <thomas.ra...@gmail.com> wrote:
> 
>>
>> Hi !
>>
>> I took multiple heap dumps. It confirms that the memory issues are in the
>> HttpSampler and HttpSamplerBase objects of JMeter and not in the Sampler
>> I
>> coded. I navigated in the heap dump but I really do not know to well
>> diagnose a memory leak so the best solution is to come back to program a
>> new
>> httpSampler plugin which dynamically generate the xmlstream and directly
>> send it to the server.
>>
>> So can you please give me some advices about it ?
>>
>> I know that it will have to extend AbstractSamplerGUI to appear in the
>> GUI
>> but who does really know how the httpSampler is functionning ?
>>
>> Regards
>>
>> Tomada
>>
>>
>> Deepak Shetty wrote:
>> >
>> > if it gives you just your xmlstream you should be fine , the vars is
>> > similar
>> > to the java.util.Map , so you can just print out size (number of
>> elements
>> > ,
>> > not the memory footprint) , vars.entrySet().size(). Alternately, at the
>> > end
>> > of every iteration you could reset all the variables using a beanshell
>> > post
>> > - processor, but it doesnt sound as if your vars is a problem.
>> >
>> >>but when I look into the
>> >>heap dump it seems to be in the httpSampler part where there is the
>> memory
>> >>leak. However, I do not know how to be really sure.
>> >
>> > if you take multiple heap dumps  and compare the differences and see
>> whats
>> > growing . I cant remember whether you can do this with JHAT(i think you
>> > can,
>> > plus there is a flag which says XX:HeapDumpOnCtrlBreak or something
>> like
>> > that), but you could with jprobe/optimize it (you get evaluation
>> editions
>> > for 15 days), you probably would need to add a delay between each
>> > iteration
>> > so that you can run an iteration, force a GC, and then run another
>> > iteration, force a GC and see what has remained behind, thats your
>> leak.
>> > id
>> > probably also create a reduced version of your test so that it
>> minimises
>> > the
>> > number of things that could be causing your problem.
>> >
>> > regards
>> > deepak
>> >
>> > On Sun, Jun 21, 2009 at 2:04 PM, tomada <thomas.ra...@gmail.com> wrote:
>> >
>> >>
>> >> Hi !
>> >>
>> >> Ok so I use print(vars.entrySet()); and it gives me my xmlstream for
>> each
>> >> iteration. What is the script to get the size or something else ?
>> >> At the beginning, I thought it was my Sampler code but when I look
>> into
>> >> the
>> >> heap dump it seems to be in the httpSampler part where there is the
>> >> memory
>> >> leak. However, I do not know how to be really sure.
>> >>
>> >> Regards
>> >>
>> >> Tomada
>> >>
>> >>
>> >> Deepak Shetty wrote:
>> >> >
>> >> > Hi
>> >> > i mean use the beanshell pre processor for diagnostics.
>> >> > Right click the sample and add a beanshell pre processor and in the
>> >> script
>> >> > type
>> >> > print(vars.entrySet());
>> >> > or the size or something and see if this keeps growing with every
>> >> > iteration
>> >> > (I dont think the HttpSample holds on to the parameters so this
>> >> shouldnt
>> >> > be
>> >> > the cause of your outofmemory).
>> >> > the other source of the leak might be your sampler code.
>> >> > regards
>> >> > deepak
>> >> >
>> >> >
>> >> >
>> >> > On Sun, Jun 21, 2009 at 1:31 PM, tomada <thomas.ra...@gmail.com>
>> wrote:
>> >> >
>> >> >>
>> >> >> Hi !
>> >> >>
>> >> >> I do not use different variable names each time. No I did not use
>> the
>> >> >> beanshell pre processors. How do you use it ?
>> >> >> When I did the load test I removed the listeners and execute Jmeter
>> >> >> without
>> >> >> GUI.
>> >> >> Regards
>> >> >> Tomada
>> >> >>
>> >> >>
>> >> >> Deepak Shetty wrote:
>> >> >> >
>> >> >> > hi
>> >> >> > just a couple of queries
>> >> >> > a. are you using different variable names each time?  can you
>> print
>> >> out
>> >> >> > vars
>> >> >> > say using beanshell preprocessors and see if this keeps growing?
>> >> >> > b. are you using some listeners like view results tree? if so can
>> >> you
>> >> >> run
>> >> >> > your test with these listeners disabled?
>> >> >> > regards
>> >> >> > deepak
>> >> >> >
>> >> >> > On Fri, Jun 19, 2009 at 3:33 PM, tomada <thomas.ra...@gmail.com>
>> >> wrote:
>> >> >> >
>> >> >> >>
>> >> >> >> Hi all !
>> >> >> >>
>> >> >> >> I am little new in Jmeter community and I am currently using it
>> for
>> >> >> Load
>> >> >> >> test on a server with a lot of datas (400kb/thread)
>> >> >> >> In order to generate those datas I need (in form of xmlstream) I
>> >> use
>> >> >> the
>> >> >> >> java sampler to do it.
>> >> >> >> You can see below the part of my scenario about it :
>> >> >> >> Loop Controller : Forever (I just have to stop the test when I
>> want
>> >> >> to)
>> >> >> >>     |-----------Java Sampler : generating a xmlstream and put it
>> in
>> >> >> the
>> >> >> >> response message
>> >> >> >>     |-----------RegExpExtractor : get the xmlstream in response
>> >> >> message
>> >> >> >> and
>> >> >> >> put it in a variable ${myXmlStream}
>> >> >> >>     |-----------HttpRequest : sendValues?${myXmlStream}
>> >> >> >>
>> >> >> >> Unfortunately, as I am doing a forever loop on it (my Java
>> Sampler
>> >> and
>> >> >> my
>> >> >> >> sendvalues http request)to keep control on the load test time, I
>> >> >> quickly
>> >> >> >> get
>> >> >> >> memory issues (out of Memory errors)which make Jmeter crashes. I
>> >> >> already
>> >> >> >> have increase the heap size but it just postpones it. I look
>> into
>> >> the
>> >> >> >> heap
>> >> >> >> dump and apparently it is the queryString object in the
>> httpSampler
>> >> >> which
>> >> >> >> contains my xmlStream which is keeping (maybe too long) the
>> >> xmlStream.
>> >> >> >> One solution I find (and please tell me if it is right one or if
>> >> may
>> >> >> >> choose
>> >> >> >> another one) is to directly generate the XmlStream in a a kind
>> of
>> >> new
>> >> >> >> HTTPSampler object. So I create a NewHTTPSampler object
>> extending
>> >> >> >> HTTPSampler, first override the sample () method to not send the
>> >> >> >> queryString
>> >> >> >> content, then build my component which actually becomes a
>> plugin,
>> >> and
>> >> >> >> then
>> >> >> >> put the jar in the lib/ext folder but when I am executing Jmeter
>> I
>> >> see
>> >> >> >> nothing new in the sampler menu.
>> >> >> >> What can I do to succeed in doing what i want to do ? Is what I
>> did
>> >> >> the
>> >> >> >> right way to deal with the memory leak or can I handle it in
>> easier
>> >> >> way
>> >> >> ?
>> >> >> >>
>> >> >> >> Thank you for your help.
>> >> >> >>
>> >> >> >> Tomada
>> >> >> >>
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >>
>> >> >>
>> >>
>> http://www.nabble.com/Java-Sampler-causing-Memory-Leak-tp24119770p24119770.html
>> >> >> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail:
>> jmeter-user-unsubscr...@jakarta.apache.org
>> >> >> >> For additional commands, e-mail:
>> >> jmeter-user-h...@jakarta.apache.org
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Java-Sampler-causing-Memory-Leak-tp24119770p24138544.html
>> >> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
>> >> >> For additional commands, e-mail:
>> jmeter-user-h...@jakarta.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Java-Sampler-causing-Memory-Leak-tp24119770p24138814.html
>> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
>> >> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Java-Sampler-causing-Memory-Leak-tp24119770p24141611.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Java-Sampler-causing-Memory-Leak-tp24119770p24178068.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org

Reply via email to