You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by amerigo5 <am...@hotmail.com> on 2006/04/04 16:19:18 UTC

Out of Memory - RC2

Using the default config of ActiveMQ-4.0-RC2, I am getting an "Out of Memory"
error after sending around 3,000+ messages (3,440+ to be exact). The message
I am sending is "Message - i" where "i" is the count of message sent.

Error on ActiveMQ server console:

Exception in thread "TcpTransportServer@tcp://localhost:60001"
java.lang.OutOfMemoryError: Java heap space

Error on Message Producer:

javax.jms.JMSException: The transport tcp://localhost:60001 of type:
org.apache.activemq.transport.tcp.TcpTransport is not running.
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:57)
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1118)
	at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1196)
	at
org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:412)
	at ProducerTest.send(ProducerTest.java:21)
	at Tester.main(Tester.java:7)
Caused by: java.io.IOException: The transport tcp://localhost:60001 of type:
org.apache.activemq.transport.tcp.TcpTransport is not running.
	at
org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:108)
	at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:116)
	at
org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
	at
org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:86)
	at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:77)
	at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
	at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:63)
	at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:68)
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1108)
	... 4 more
Apr 4, 2006 9:00:59 AM org.apache.activemq.ActiveMQConnection
onAsyncException
WARNING: Async exception with no exception listener:
java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:168)
	at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:48)
	at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:55)
	at java.io.DataInputStream.readInt(DataInputStream.java:353)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:270)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:135)
	at java.lang.Thread.run(Thread.java:595)


Anyone getting the same issue here?  I never had this issue with RC1.

Thanks.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3745254
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Yes, that's correct.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3775201
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Hiram Chirino <hi...@hiramchirino.com>.
BTW: this happens when using persistent messages sent to a queue right?


On 4/5/06, amerigo5 <am...@hotmail.com> wrote:
>
> What does this mean for an ActiveMQ user?
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3774272
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Re: Out of Memory - RC2

Posted by Rob Davies <ra...@gmail.com>.
there is now a 'fix' for this in SVN  - would you mind seeing if this  
is now resolved for you ?

cheers,

Rob

On 7 Apr 2006, at 16:24, amerigo5 wrote:

>
> After setting the property useJmx from "true" to "false", the issue  
> I was
> having disappeared.  Here's the change:
>
> FROM:
>
> <broker brokerName="master1" persistent="true" useJmx="true">
>
> TO:
>
> <broker brokerName="master1" persistent="true" useJmx="false">
>
>
> I guess for now, I will set the useJmx property to "false" and  
> continue my
> test.
>
> Thanks.
>
>
> --
> View this message in context: http://www.nabble.com/Out-of-Memory--- 
> RC2-t1393354.html#a3805672
> Sent from the ActiveMQ - User forum at Nabble.com.
>


Re: Out of Memory - RC2

Posted by yaussy <ya...@cboe.com>.
Well, dang.  Could not reproduce this.  My imagination?  I'll keep testing...
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3842557
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by yaussy <ya...@cboe.com>.
I'm a little concerned about this issue too (RC2).  I will need to confirm
Monday, but I've seen a memory usage issue using non-durable topics.  I
don't believe I experienced this issue with the 3/22 SNAPSHOT, which was the
most recent snapshot I used prior to RC2 (but I will confirm).

The scenario is:
two brokers - A, B
publisher connects to A
consumer connects to B
I have topic and dispatch policies on the brokers such that the queue
between brokers is 10000, and the pending queue is 5000.  The eviction
policy is evict-oldest.

I kill off (kill-9) broker B

The A broker continues to queue to the B broker queue.  This grows to 10000,
then the pending queue grows to 5000.  This is fine, and continues to report
this #, as well as discards increasing.

However, I noticed a slow growth in memory.  Plus, the journal appeared to
grow as well, which really surprised me, since I was sending non-durable
messages.

Later, I restarted the A broker, and the memory footprint was such that it
looked to me like it pulled in the messages from the journal.

Again, I will confirm this Monday, because I was actually testing something
completely different and didn't notice things such as the journal and
restart-footprint until a day later.  So, I want to redo some tests with
this issue in mind.

--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3811206
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Rob Davies <ra...@gmail.com>.
I've raised a jira issue for this: http://issues.apache.org/activemq/ 
browse/AMQ-683

On 7 Apr 2006, at 16:24, amerigo5 wrote:

>
> After setting the property useJmx from "true" to "false", the issue  
> I was
> having disappeared.  Here's the change:
>
> FROM:
>
> <broker brokerName="master1" persistent="true" useJmx="true">
>
> TO:
>
> <broker brokerName="master1" persistent="true" useJmx="false">
>
>
> I guess for now, I will set the useJmx property to "false" and  
> continue my
> test.
>
> Thanks.
>
>
> --
> View this message in context: http://www.nabble.com/Out-of-Memory--- 
> RC2-t1393354.html#a3805672
> Sent from the ActiveMQ - User forum at Nabble.com.
>


Re: Out of Memory - RC2

Posted by TheGuru <gu...@gmail.com>.
How does the JMX being set from true to false help? How is it related to the
spooling issue?
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a4105198
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Rob Davies <ra...@gmail.com>.
RC3  was released a while ago - you can get it from here: http:// 
cvs.apache.org/repository/incubator-activemq/distributions/

On 26 Apr 2006, at 02:39, TheGuru wrote:

>
> When are you expecting to release RC3?
> --
> View this message in context: http://www.nabble.com/Out-of-Memory--- 
> RC2-t1393354.html#a4093529
> Sent from the ActiveMQ - User forum at Nabble.com.
>


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Thinking about it, it might not be a memory leak.  But........

Before I start sending messages, there is approximately 300 MB of memory. At
this point, I have ActiveMQ and Eclipse running.  But after sending
1,000,000 messages (that's right --- 1 million), there is approximately 800
MB of memory.  Then, I close Eclipse.  The memory goes down to between 700
MB and 800 MB of memory.  Then, I shutdown ActiveMQ.  The memory goes back
down to approximately 300 MB.

What do you think?
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a4142302
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Rob Davies <ra...@gmail.com>.
Can you elaborate ? What are the symptoms of the memory leak in RC3 ?

On 26 Apr 2006, at 14:45, amerigo5 wrote:

>
> Refer to this post for more info about RC3:
>
> http://www.nabble.com/-VOTE-ActiveMQ-4.0-RC3-t1431912.html
>
> But even RC3 have memory leak issue :(
> --
> View this message in context: http://www.nabble.com/Out-of-Memory--- 
> RC2-t1393354.html#a4101515
> Sent from the ActiveMQ - User forum at Nabble.com.
>


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Refer to this post for more info about RC3:

http://www.nabble.com/-VOTE-ActiveMQ-4.0-RC3-t1431912.html

But even RC3 have memory leak issue :(
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a4101515
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by TheGuru <gu...@gmail.com>.
When are you expecting to release RC3?
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a4093529
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Rob Davies <ra...@gmail.com>.
We've fixed some memory leaks in the RC3 release (which is still in  
the process of being voted) - which will hopefully fix this issue.

cheers,

Rob

On 14 Apr 2006, at 11:35, Dmitriy Fot wrote:

>
> Hi,
>
> I tried persistent="true", and persistent="false" too.
> I also tried different acknowledgement modes.
>
> The result is always the same: OutOfMemory after sending 430 messages;
>
> Dmitriy.
> --
> View this message in context: http://www.nabble.com/Out-of-Memory--- 
> RC2-t1393354.html#a3914933
> Sent from the ActiveMQ - User forum at Nabble.com.
>


Re: Out of Memory - RC2

Posted by Dmitriy Fot <dm...@gmail.com>.
Hi,

I tried persistent="true", and persistent="false" too. 
I also tried different acknowledgement modes. 

The result is always the same: OutOfMemory after sending 430 messages; 

Dmitriy.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3914933
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Can you try to set the persistent to true (persistent="true")?  Also, please
make sure that you are using jar files from RC2. 
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3900593
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Dmitriy Fot <dm...@gmail.com>.
Thanks for the reply.

My activemq.xml:

<beans xmlns="http://activemq.org/config/1.0">
 
  <broker brokerName="master1" persistent="false" useJmx="false">
     
    <transportConnectors>
       <transportConnector name="default" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="stomp"   uri="stomp://localhost:60008"/>
    </transportConnectors>
   
    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
        <networkConnector name="default" uri="multicast://default"/>
    </networkConnectors>
   
  </broker>

</beans>
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3899994
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
With RC2, you have to set the useJmx to false (useJmx="false") as a
workaround to out of memory issue.  Also, can you post your config file
(activemq.xml)?  Thanks.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3899347
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Dmitriy Fot <dm...@gmail.com>.
Hi,

I downloaded activemq-4.0-RC2, but the problem is still present. I can not
sent more than 431 messages to the queue, regardless whether the server is
on or of. Producer always throws outOfMemory error after sending 431
messages.

Thnaks, 
Dmitriy

--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3894654
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Setting useJmx to false is a workaround for ActiveMQ-4.0-RC2.  If you're
using ActiveMQ-4.0-M4, the best thing to do is probably use the latest
version.  Or you can use ActiveMQ-4.0-RC1.  I haven't tested
ActiveMQ-4.0-RC3 so I cannot recommend it.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3881760
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Dmitriy Fot <dm...@gmail.com>.
Hi everybody.

I have the same problem. My producer throws OutOfMemoryError after sending
437 messages. I also use persistent queue. ActiveMQ version is
activemq-4.0-M4.
I set useJmx to false but the problem did not disappeared. 

Any help is appreciated.





--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3878745
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
After setting the property useJmx from "true" to "false", the issue I was
having disappeared.  Here's the change:

FROM: 

<broker brokerName="master1" persistent="true" useJmx="true"> 

TO:

<broker brokerName="master1" persistent="true" useJmx="false"> 


I guess for now, I will set the useJmx property to "false" and continue my
test.

Thanks.


--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3805672
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Hi,

I've been testing today and I've so far pushed about 100,000 1k
persistent messages to queue without any consumers and have not had
any problems yet.

On 4/5/06, amerigo5 <am...@hotmail.com> wrote:
>
> Thanks for the explanation.
>
> This is probably what's happening.  I guess, this is considered as a bug.
>
> One of my test (case) for ActiveMQ is that I will only have producers and no
> consumers.  I will send 1 million messages.  Hopefully, ActiveMQ can handle
> it.
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3775302
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Thanks for the explanation.

This is probably what's happening.  I guess, this is considered as a bug.

One of my test (case) for ActiveMQ is that I will only have producers and no
consumers.  I will send 1 million messages.  Hopefully, ActiveMQ can handle
it.

Thanks.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3775302
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Spooling is a new feature for persistent messages sent to a queue
where if the producer is faster than the consumer, we chuck out
persisted messages out of memory to allow the producer going. 
Previously, we would pause the producer until the consumer consumed
some messages.  I guess we are having a regression where those
messages are not being properly chucked out of memory.

On 4/5/06, amerigo5 <am...@hotmail.com> wrote:
>
> What does this mean for an ActiveMQ user?
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3774272
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
What does this mean for an ActiveMQ user?

Thanks.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3774272
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by Hiram Chirino <hi...@hiramchirino.com>.
This sounds like a regression with the spooling feature.

On 4/5/06, amerigo5 <am...@hotmail.com> wrote:
>
> I am using queues.
> --
> View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3766429
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--
Regards,
Hiram

Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
I am using queues.
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3766429
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by James Strachan <ja...@gmail.com>.
Are you using queues or topics?

James

On 4/4/06, amerigo5 <am...@hotmail.com> wrote:
>
> Here's the complete error from ActiveMQ server console (this info showed up
> long after it crashed or stopped responding to clients):
>
> Exception in thread "TcpTransportServer@tcp://localhost:60001"
> java.lang.OutOfMemoryError: Java heap space
> ERROR JournalPersistenceAdapter      - Failed to checkpoint a message store:
> edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
> java.io.IOException: Not started.
> edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
> java.io.IOException: Not started.
>         at
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:118)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:377)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:121)
>         at
> org.apache.activemq.thread.SimpleTaskRunner.runTask(SimpleTaskRunner.java:110)
>         at
> org.apache.activemq.thread.SimpleTaskRunner.access$100(SimpleTaskRunner.java:25)
>         at
> org.apache.activemq.thread.SimpleTaskRunner$1.run(SimpleTaskRunner.java:43)
>          at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.IOException: Not started.
>         at
> org.apache.activemq.store.jdbc.TransactionContext.rollback(TransactionContext.java:164)
>         at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.rollbackTransaction(JDBCPersistenceAdapter.java:308)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.rollbackTransaction(JournalPersistenceAdapter.java:189)
>         at
> org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:61)
>         at
> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:246)
>         at
> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:220)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:347)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
>         ... 3 more
> WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
> java.io.IOException: Failed to start database 'derbydb', see the next
> exception for details.
> java.io.IOException: Failed to start database 'derbydb', see the next
> exception for details.
>         at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:42)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:58)
>         at
> org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDeleteOldMessages(DefaultJDBCAdapter.java:546)
>         at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.cleanup(JDBCPersistenceAdapter.java:179)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:407)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:121)
>         at
> org.apache.activemq.thread.SimpleTaskRunner.runTask(SimpleTaskRunner.java:110)
>         at
> org.apache.activemq.thread.SimpleTaskRunner.access$100(SimpleTaskRunner.java:25)
>         at
> org.apache.activemq.thread.SimpleTaskRunner$1.run(SimpleTaskRunner.java:43)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: SQL Exception: Failed to start database 'derbydb', see the next
> exception for details.
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
> Source)
>         at
> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
> Source)
>         at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
> Source)
>         at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>         at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown
> Source)
>         at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown
> Source)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
>         ... 10 more
> WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
> SQL Exception: Java exception: 'Java heap space:
> java.lang.OutOfMemoryError'.
> WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
> SQL Exception: Java exception: 'Java heap space:
> java.lang.OutOfMemoryError'.
> WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
> SQL Exception: Java exception: 'Java heap space:
> java.lang.OutOfMemoryError'.
> WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
> SQL Exception: Java exception: 'Java heap space:
> java.lang.OutOfMemoryError'.
> WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
> SQL Exception: Java exception: 'Java heap space:
> java.lang.OutOfMemoryError'.
> WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
> SQL Exception: Java exception: 'Java heap space:
> java.lang.OutOfMemoryError'.
>
> --
> View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3751750
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Here's the complete error from ActiveMQ server console (this info showed up
long after it crashed or stopped responding to clients):

Exception in thread "TcpTransportServer@tcp://localhost:60001"
java.lang.OutOfMemoryError: Java heap space
ERROR JournalPersistenceAdapter      - Failed to checkpoint a message store:
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
java.io.IOException: Not started.
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
java.io.IOException: Not started.
        at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
        at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:118)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:377)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:121)
        at
org.apache.activemq.thread.SimpleTaskRunner.runTask(SimpleTaskRunner.java:110)
        at
org.apache.activemq.thread.SimpleTaskRunner.access$100(SimpleTaskRunner.java:25)
        at
org.apache.activemq.thread.SimpleTaskRunner$1.run(SimpleTaskRunner.java:43)
	 at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Not started.
        at
org.apache.activemq.store.jdbc.TransactionContext.rollback(TransactionContext.java:164)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.rollbackTransaction(JDBCPersistenceAdapter.java:308)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.rollbackTransaction(JournalPersistenceAdapter.java:189)
        at
org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:61)
        at
org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:246)
        at
org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:220)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:347)
	at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
        ... 3 more
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
java.io.IOException: Failed to start database 'derbydb', see the next
exception for details.
java.io.IOException: Failed to start database 'derbydb', see the next
exception for details.
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:42)
        at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:58)
        at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDeleteOldMessages(DefaultJDBCAdapter.java:546)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.cleanup(JDBCPersistenceAdapter.java:179)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:407)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:121)
 	at
org.apache.activemq.thread.SimpleTaskRunner.runTask(SimpleTaskRunner.java:110)
        at
org.apache.activemq.thread.SimpleTaskRunner.access$100(SimpleTaskRunner.java:25)
        at
org.apache.activemq.thread.SimpleTaskRunner$1.run(SimpleTaskRunner.java:43)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: SQL Exception: Failed to start database 'derbydb', see the next
exception for details.
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
        at
org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
Source)
 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
Source)
        at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown
Source)
        at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
        at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown
Source)
        at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown
Source)
        at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
        ... 10 more
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
SQL Exception: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
SQL Exception: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
SQL Exception: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
SQL Exception: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
SQL Exception: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
WARN  JDBCPersistenceAdapter         - Old message cleanup failed due to:
SQL Exception: Java exception: 'Java heap space:
java.lang.OutOfMemoryError'.
 
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3751750
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by TheGuru <gu...@gmail.com>.
I have been facing this same exception as well.

There are a number of parameters that can be set on a message before being
sent by a MessageProducer.
http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html
I tried setting setPriority(0) and setTimeToLive(60000) (60 seconds). I was
hoping these will alleviate the problem. But these things had absolutely no
effect. In fact i dont think my setTimeToLive was even respected. The
message Q kept growing and ultimately i got the same OutOfMemoryException.

Here us my activemq.xml file





<!-- START SNIPPET: xbean -->
<beans xmlns="http://activemq.org/config/1.0">

  <broker useJmx="false">

    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5" dataDirectory="activemq-data"/>
    </persistenceAdapter>

    <transportConnectors>
        <transportConnector name="default" uri="tcp://localhost:62002" />
    </transportConnectors>

    <networkConnectors>
      <networkConnector
uri="static:(tcp://host1:62002,tcp://host2:62002,tcp://host3:62002)"
failover="true"/>
    </networkConnectors>

  </broker>

</beans>
<!-- END SNIPPET: xbean -->

--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a4093509
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
My producer code is sending durable message.

I am using the default configuration of RC2.

With regards to the broker heap size,  I am not sure.  I am using the
default.

I ran my existing producer code against RC1 and I was able to send around
140,000+ messages without error.  I could probably continue sending more
messages and RC1 would not complain.

The "memoryManager" property on config file is commented out currently.

Thanks.


--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3745756
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by amerigo5 <am...@hotmail.com>.
Also, here's my config:

<beans xmlns="http://activemq.org/config/1.0">
  
  <broker brokerName="master1" persistent="true" useJmx="true">
  
    <!--  Use the following to set the broker memory limit (in bytes)
  	<memoryManager>  
	  	<usageManager id="memory-manager" limit="1048576"/>
  	</memoryManager>
  	-->
  	
	<!-- Use the following to configure how ActiveMQ is exposed in JMX -->
	<managementContext>
	   <managementContext connectorPort="60009"
jmxDomainName="org.apache.activemq"/>
	</managementContext>
	
  
    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"/>
    </persistenceAdapter>
  
    <transportConnectors>
       <transportConnector name="default" uri="tcp://localhost:60001"
discoveryUri="multicast://default"/>
       <transportConnector name="stomp"   uri="stomp://localhost:60008"/>
    </transportConnectors>
    
    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
	<networkConnector name="default" uri="multicast://default"/>
    </networkConnectors>
    
  </broker>

</beans>
--
View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3749161
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Out of Memory - RC2

Posted by James Strachan <ja...@gmail.com>.
What quality of service are you using (durable/non-durable? what
configuration?).

Also what is the heap size you've configured for your broker?

James

On 4/4/06, amerigo5 <am...@hotmail.com> wrote:
>
> Using the default config of ActiveMQ-4.0-RC2, I am getting an "Out of Memory"
> error after sending around 3,000+ messages (3,440+ to be exact). The message
> I am sending is "Message - i" where "i" is the count of message sent.
>
> Error on ActiveMQ server console:
>
> Exception in thread "TcpTransportServer@tcp://localhost:60001"
> java.lang.OutOfMemoryError: Java heap space
>
> Error on Message Producer:
>
> javax.jms.JMSException: The transport tcp://localhost:60001 of type:
> org.apache.activemq.transport.tcp.TcpTransport is not running.
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:57)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1118)
>         at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1196)
>         at
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:412)
>         at ProducerTest.send(ProducerTest.java:21)
>         at Tester.main(Tester.java:7)
> Caused by: java.io.IOException: The transport tcp://localhost:60001 of type:
> org.apache.activemq.transport.tcp.TcpTransport is not running.
>         at
> org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:108)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:116)
>         at
> org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
>         at
> org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:86)
>         at
> org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:77)
>         at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
>         at
> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:63)
>         at
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:68)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1108)
>         ... 4 more
> Apr 4, 2006 9:00:59 AM org.apache.activemq.ActiveMQConnection
> onAsyncException
> WARNING: Async exception with no exception listener:
> java.net.SocketException: Connection reset
> java.net.SocketException: Connection reset
>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
>         at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:48)
>         at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:55)
>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
>         at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:270)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:135)
>         at java.lang.Thread.run(Thread.java:595)
>
>
> Anyone getting the same issue here?  I never had this issue with RC1.
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a3745254
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/