You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Yong Liu <yl...@gmail.com> on 2006/12/01 18:05:07 UTC

activemq 4.0.1 on 64-bit AMD machine with 64-bit jdk5: java.lang.OutOfMemoryError: Java heap space

Hi all,

We have been using Activemq 4.0.1 on a 64-bit AMD machine with 64-bit jdk5:
------------------------------------
Running Environment:
-bash-2.05b$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_07-b03, mixed mode)
-bash-2.05b$ uname -a
Linux myrica 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:32:18 EDT 2005 x86_64
x86_64 x86_64 GNU/Linux
-----------------------------------

We have been using the default configuration file which came with the
Activemq 4.0.1 to start the broker. Everything works fine initially.
But we have experienced some strange problems usually after serveral
days of running the broker and then the broker refuses to make new
connections and throws OOM error. Here is the error message from the
error log (smlog);

WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=47
ERROR TransportConnector             - Could not accept connection:
java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
        at java.io.DataOutputStream.flush(DataOutputStream.java:106)
        at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
        at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
        at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:128)
        at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:64)
        at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
        at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
        at org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:75)
        at org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:136)
        at org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:137)
        at java.lang.Thread.run(Thread.java:595)
WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=53
WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=54
WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=55
WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=57
WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=59
WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=60
WARN  ManagedTransportConnection     - Failed to unregister mbean:
org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=62
Exception in thread "ActiveMQ Transport: tcp:///141.142.2.196:50581"
java.lang.OutOfMemoryError: Java heap space
------

Have you ever seen this before? Is this related to the clients code
(such as connection management), or is it related to the broker
itself? Does 64-bit jdk5 have anything to do with this?

Thanks,

-yong

Re: activemq 4.0.1 on 64-bit AMD machine with 64-bit jdk5: java.lang.OutOfMemoryError: Java heap space

Posted by James Strachan <ja...@gmail.com>.
Your best bet is to try a profiiler, it will show you where all the
RAM is being used up.

On 12/1/06, Yong Liu <yo...@ncsa.uiuc.edu> wrote:
> Hi James,
>
> Thanks for such prompt reply. I have used -Xmx512M for the JVM. And
> from the jconsole, usually when in the normal day, the activemq only
> uses 50MB.
>
> So how large is enough? BTW: we only use non-durable JMS topic, not
> queue. And other configurations are by default except the first one:
>   <!--  Use the following to set the broker memory limit (in bytes)
>     <memoryManager>
>         <usageManager id="memory-manager" limit="1048576"/>
>     </memoryManager>
>
> We try to identify whether this OOM issue is because buggy client
> code, or the broker configuration.
>
> Any more suggestions?
>
> -Yong
>
>
>
>
> On 12/1/06, James Strachan <ja...@gmail.com> wrote:
> > It just looks like its run out of heap. Try increasing it?
> >
> > On 12/1/06, Yong Liu <yl...@gmail.com> wrote:
> > > Hi all,
> > >
> > > We have been using Activemq 4.0.1 on a 64-bit AMD machine with 64-bit jdk5:
> > > ------------------------------------
> > > Running Environment:
> > > -bash-2.05b$ java -version
> > > java version "1.5.0_07"
> > > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> > > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_07-b03, mixed mode)
> > > -bash-2.05b$ uname -a
> > > Linux myrica 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:32:18 EDT 2005 x86_64
> > > x86_64 x86_64 GNU/Linux
> > > -----------------------------------
> > >
> > > We have been using the default configuration file which came with the
> > > Activemq 4.0.1 to start the broker. Everything works fine initially.
> > > But we have experienced some strange problems usually after serveral
> > > days of running the broker and then the broker refuses to make new
> > > connections and throws OOM error. Here is the error message from the
> > > error log (smlog);
> > >
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=47
> > > ERROR TransportConnector             - Could not accept connection:
> > > java.net.SocketException: Connection reset
> > > java.net.SocketException: Connection reset
> > >         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
> > >         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> > >         at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
> > >         at java.io.DataOutputStream.flush(DataOutputStream.java:106)
> > >         at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
> > >         at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
> > >         at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:128)
> > >         at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:64)
> > >         at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
> > >         at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
> > >         at org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:75)
> > >         at org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:136)
> > >         at org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:137)
> > >         at java.lang.Thread.run(Thread.java:595)
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=53
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=54
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=55
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=57
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=59
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=60
> > > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=62
> > > Exception in thread "ActiveMQ Transport: tcp:///141.142.2.196:50581"
> > > java.lang.OutOfMemoryError: Java heap space
> > > ------
> > >
> > > Have you ever seen this before? Is this related to the clients code
> > > (such as connection management), or is it related to the broker
> > > itself? Does 64-bit jdk5 have anything to do with this?
> > >
> > > Thanks,
> > >
> > > -yong
> > >
> >
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
>


-- 

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

Re: activemq 4.0.1 on 64-bit AMD machine with 64-bit jdk5: java.lang.OutOfMemoryError: Java heap space

Posted by Yong Liu <yo...@ncsa.uiuc.edu>.
Hi James,

Thanks for such prompt reply. I have used -Xmx512M for the JVM. And
from the jconsole, usually when in the normal day, the activemq only
uses 50MB.

So how large is enough? BTW: we only use non-durable JMS topic, not
queue. And other configurations are by default except the first one:
  <!--  Use the following to set the broker memory limit (in bytes)
    <memoryManager>
        <usageManager id="memory-manager" limit="1048576"/>
    </memoryManager>

We try to identify whether this OOM issue is because buggy client
code, or the broker configuration.

Any more suggestions?

-Yong




On 12/1/06, James Strachan <ja...@gmail.com> wrote:
> It just looks like its run out of heap. Try increasing it?
>
> On 12/1/06, Yong Liu <yl...@gmail.com> wrote:
> > Hi all,
> >
> > We have been using Activemq 4.0.1 on a 64-bit AMD machine with 64-bit jdk5:
> > ------------------------------------
> > Running Environment:
> > -bash-2.05b$ java -version
> > java version "1.5.0_07"
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_07-b03, mixed mode)
> > -bash-2.05b$ uname -a
> > Linux myrica 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:32:18 EDT 2005 x86_64
> > x86_64 x86_64 GNU/Linux
> > -----------------------------------
> >
> > We have been using the default configuration file which came with the
> > Activemq 4.0.1 to start the broker. Everything works fine initially.
> > But we have experienced some strange problems usually after serveral
> > days of running the broker and then the broker refuses to make new
> > connections and throws OOM error. Here is the error message from the
> > error log (smlog);
> >
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=47
> > ERROR TransportConnector             - Could not accept connection:
> > java.net.SocketException: Connection reset
> > java.net.SocketException: Connection reset
> >         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
> >         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> >         at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
> >         at java.io.DataOutputStream.flush(DataOutputStream.java:106)
> >         at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
> >         at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
> >         at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:128)
> >         at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:64)
> >         at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
> >         at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
> >         at org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:75)
> >         at org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:136)
> >         at org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:137)
> >         at java.lang.Thread.run(Thread.java:595)
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=53
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=54
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=55
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=57
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=59
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=60
> > WARN  ManagedTransportConnection     - Failed to unregister mbean:
> > org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=62
> > Exception in thread "ActiveMQ Transport: tcp:///141.142.2.196:50581"
> > java.lang.OutOfMemoryError: Java heap space
> > ------
> >
> > Have you ever seen this before? Is this related to the clients code
> > (such as connection management), or is it related to the broker
> > itself? Does 64-bit jdk5 have anything to do with this?
> >
> > Thanks,
> >
> > -yong
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>

Re: activemq 4.0.1 on 64-bit AMD machine with 64-bit jdk5: java.lang.OutOfMemoryError: Java heap space

Posted by James Strachan <ja...@gmail.com>.
It just looks like its run out of heap. Try increasing it?

On 12/1/06, Yong Liu <yl...@gmail.com> wrote:
> Hi all,
>
> We have been using Activemq 4.0.1 on a 64-bit AMD machine with 64-bit jdk5:
> ------------------------------------
> Running Environment:
> -bash-2.05b$ java -version
> java version "1.5.0_07"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_07-b03, mixed mode)
> -bash-2.05b$ uname -a
> Linux myrica 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:32:18 EDT 2005 x86_64
> x86_64 x86_64 GNU/Linux
> -----------------------------------
>
> We have been using the default configuration file which came with the
> Activemq 4.0.1 to start the broker. Everything works fine initially.
> But we have experienced some strange problems usually after serveral
> days of running the broker and then the broker refuses to make new
> connections and throws OOM error. Here is the error message from the
> error log (smlog);
>
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=47
> ERROR TransportConnector             - Could not accept connection:
> java.net.SocketException: Connection reset
> java.net.SocketException: Connection reset
>         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>         at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
>         at java.io.DataOutputStream.flush(DataOutputStream.java:106)
>         at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
>         at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
>         at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:128)
>         at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:64)
>         at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
>         at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
>         at org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:75)
>         at org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:136)
>         at org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:137)
>         at java.lang.Thread.run(Thread.java:595)
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=53
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=54
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=55
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=57
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=59
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=60
> WARN  ManagedTransportConnection     - Failed to unregister mbean:
> org.apache.activemq:BrokerName=ECID_Event_Broker,Type=Connection,ConnectorName=default,Connection=62
> Exception in thread "ActiveMQ Transport: tcp:///141.142.2.196:50581"
> java.lang.OutOfMemoryError: Java heap space
> ------
>
> Have you ever seen this before? Is this related to the clients code
> (such as connection management), or is it related to the broker
> itself? Does 64-bit jdk5 have anything to do with this?
>
> Thanks,
>
> -yong
>


-- 

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