The first question is do you run into OutOfMemoryError ? The garbage
collector behavior can be tuned (check the docs of the JVM) but I
would say that using the whole available heap is not a problem.  When
the JVM will run out of memory, the garbage collector will start and
remove all unneeded objects.  Such a process is done automatically, so
unless you run into errors i would not worry about it (but you can
still experience with JVM parameters to tune the GC).

Also, do you use the latest JVM ? I've already seen memory issues in
ServiceMix caused by bugs in the JVM.  It may not be related, but it's
worth making sure of that.

If you actually have OOM errors, you should try running a profiler ?
It should give you some indications on what the leaking objects are,
where they have been created, and why they are held.


On Thu, Oct 2, 2008 at 12:46 PM, Sriram83 <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> In the loan broker example, while getting data from an exchange, if we try
> to append any data to it, the memory in tenure space increases.
>
> Please refer the below line of code:
>
>
>                        String corelationid = (String) exchange
>                                        .getProperty("Corelationdetails");
>                        MessageExchange originalExchange = (MessageExchange) 
> store
>                                        .remove(corelationid);
>                        String tmpData = new String();
>                        String data =
> ((StringSource)exchange.getMessage("out").getContent()).getText();
>                        tmpData = data;
> // This line causes increase in memory --> tmpData =
> "<ROOT>"+tmpData+"</ROOT>";
>
>                        NormalizedMessage out = 
> originalExchange.createMessage();
>                        out.setContent(new StringSource(tmpData));
>                        originalExchange.setMessage(out,"out");
>                        send(originalExchange);
>
>
> uncommenting the line causes an increase in the memory. Please, help us
> solve this.
>
> This is causing big issues to us. Also, I have uploaded the loanbroker
> example for your reference.
>
> Regards,
> Sriram
>
>
>
> Sriram83 wrote:
>>
>> HI,
>>
>> I made a small change in the lon-broker example given in the service mix.
>>
>> I added a huge XML in the out Message of CreditAgency.
>>
>> When I did a load test with 3 concurrent users, the heap memory kept on
>> increasing.
>>
>> Only when the maximum allocated memory is reached, GC takes place and the
>> memory is cleared.
>>
>> Alternaltively, if I force a GC using JMX, the memory is cleared up.
>>
>> I notice the same behaviour in the class that I have attaached as well.
>>
>> This is very concerning and we will appreciate if some one can help us in
>> this regard.
>>
>> Thanks,
>> Sriram
>>
>>
>>
>>
>> Sriram83 wrote:
>>>
>>> Hi,
>>>
>>> I have the below requirement:
>>>
>>> Service Engine --> Sends requests to multiple endpoints --> aggregates
>>> the responses from different endpoints
>>>
>>> We implemented this by creating a service engine by over-riding Provider
>>> endpoint. We followed the same approach as given in the Loan broker
>>> example.
>>>
>>> The problem we are facing is that, for multiple requests, the heap memory
>>> increases until it reaches the maximum memory.
>>>
>>> I have attached the source file as well.
>>>
>>> Please help us, as this is creating huge issues in our environment.
>>>
>>> Thanks,
>>> Sriram
>>>  http://www.nabble.com/file/p19770192/MultiCastAggregator.txt
>>> MultiCastAggregator.txt
>>>
>>
>>
> http://www.nabble.com/file/p19777019/LoanBroker.java LoanBroker.java
> --
> View this message in context: 
> http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19777019.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://open.iona.com

Reply via email to