You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sriram83 <ss...@gmail.com> on 2008/10/02 00:12:37 UTC

URGENT: Servicemix Memory related problem

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 
-- 
View this message in context: http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19770192.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: URGENT: Servicemix Memory related problem

Posted by Sriram83 <ss...@gmail.com>.
Hi, We checked 1.5.11, 1.5.14,1.5.16 the behaviour is the same. 

We will check the GC option and see the difference it makes.

But I have a query: while reading content of the normalised message from
another endpoint, if I pass on the message as it is, the memory remains
normal. However, if I do any manipulations with this, the memory increases
really huge.

String data =
((StringSource)exchange.getMessage("out").getContent()).getText(); 

The above line works fine. 

However, if I add a string to it, heap memory is quickly used up.

// This line causes increase in memory  
 data = "<ROOT>"+data+"</ROOT>"; 

Why does this happen?

Regards,
Sriram


gnodet wrote:
> 
> The behavior of the GC can be controlled by adding parameters on the
> command line when launching the JVM.
> You can add those in the batch script for servicemix.
> Take a look at
> http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html
> 
> On Thu, Oct 2, 2008 at 3:31 PM, Sriram83 <ss...@gmail.com> wrote:
>>
>> Thanks for your inputs.
>>
>> We are not running into Out of memory Error.
>>
>> We have a linux box where the min-max memory is set to 4 GB. We did a
>> load
>> test with 5 concurrent users. Within  15 minutes of usage, the heap space
>> was filled up and GCed, the memory came back to what it was originally.
>> There wasnt much swapping as well.
>>
>> But one thing is, if we stop the tests when the heap memory reached 3.8
>> MB,
>> the memory stays there. It gets reclaimed only after the Jboss does the
>> GC
>> or we forcefully do GC using JMX Console.
>>
>> Do you think, this behaviour is acceptable?
>>
>> We will try with the latest JVM and see if it makes any difference as
>> well.
>>
>> Thanks,
>> Sriram
>>
>>
>>
>> gnodet wrote:
>>>
>>> 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 <ss...@gmail.com> 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
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19779277.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
> 
> 

-- 
View this message in context: http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19781725.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: URGENT: Servicemix Memory related problem

Posted by Guillaume Nodet <gn...@gmail.com>.
The behavior of the GC can be controlled by adding parameters on the
command line when launching the JVM.
You can add those in the batch script for servicemix.
Take a look at http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html

On Thu, Oct 2, 2008 at 3:31 PM, Sriram83 <ss...@gmail.com> wrote:
>
> Thanks for your inputs.
>
> We are not running into Out of memory Error.
>
> We have a linux box where the min-max memory is set to 4 GB. We did a load
> test with 5 concurrent users. Within  15 minutes of usage, the heap space
> was filled up and GCed, the memory came back to what it was originally.
> There wasnt much swapping as well.
>
> But one thing is, if we stop the tests when the heap memory reached 3.8 MB,
> the memory stays there. It gets reclaimed only after the Jboss does the GC
> or we forcefully do GC using JMX Console.
>
> Do you think, this behaviour is acceptable?
>
> We will try with the latest JVM and see if it makes any difference as well.
>
> Thanks,
> Sriram
>
>
>
> gnodet wrote:
>>
>> 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 <ss...@gmail.com> 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
>>
>>
>
> --
> View this message in context: http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19779277.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

Re: URGENT: Servicemix Memory related problem

Posted by Sriram83 <ss...@gmail.com>.
Thanks for your inputs. 

We are not running into Out of memory Error.

We have a linux box where the min-max memory is set to 4 GB. We did a load
test with 5 concurrent users. Within  15 minutes of usage, the heap space
was filled up and GCed, the memory came back to what it was originally.
There wasnt much swapping as well. 

But one thing is, if we stop the tests when the heap memory reached 3.8 MB,
the memory stays there. It gets reclaimed only after the Jboss does the GC
or we forcefully do GC using JMX Console. 

Do you think, this behaviour is acceptable?

We will try with the latest JVM and see if it makes any difference as well.

Thanks,
Sriram



gnodet wrote:
> 
> 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 <ss...@gmail.com> 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
> 
> 

-- 
View this message in context: http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19779277.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: URGENT: Servicemix Memory related problem

Posted by Guillaume Nodet <gn...@gmail.com>.
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 <ss...@gmail.com> 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

Re: URGENT: Servicemix Memory related problem

Posted by Sriram83 <ss...@gmail.com>.
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.


Re: URGENT: Servicemix Memory related problem

Posted by Sriram83 <ss...@gmail.com>.
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 
> 

-- 
View this message in context: http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19771301.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: URGENT: Servicemix Memory related problem

Posted by jawed <ja...@sabre-holdings.com>.


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 
> 

Try going through GC information from this web:
http://www.javapassion.com/javaperformance/#Garbage_Collection_GC_Schemes
There is coding session in this also which should clear String usage
Cheers
Jawed
-- 
View this message in context: http://www.nabble.com/URGENT%3A-Servicemix-Memory-related-problem-tp19770192p19803105.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.