GeeCON Prague 2014*
The moose likes Other JSE/JEE APIs and the fly likes Apache James Out of Memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Apache James Out of Memory" Watch "Apache James Out of Memory" New topic
Author

Apache James Out of Memory

sheshasai sai
Greenhorn

Joined: Oct 30, 2013
Posts: 5
I am getting the following error .Anyone know what could be the reason for this

Oct 11, 2013 5:19:49 PM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAcceptLoop
WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=58864] throws
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1686
    
  25

Hi Sheshasai Sai,

Welcome to Javaranch!

Can you provide us with TellTheDetails information?

Regard,
Frits
sheshasai sai
Greenhorn

Joined: Oct 30, 2013
Posts: 5
Hi Frits ,

using the apache james beta 4 mail server with activemq 5.4.2 , and after 1 day the deployment of the product getting the outofthememory error .tried all the luck with jvm heap settings ,thread stack size everything , wanted to know how activemq can be culprit in this issue.

regards
Sheshasai
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42042
    
  64
Are you using separate JVMs for James and ActiveMQ? If not, start with that, so that you which component uses up the memory. Also, how much memory are you giving to the JVM? Servers generally need more than the default allocation.


Ping & DNS - my free Android networking tools app
sheshasai sai
Greenhorn

Joined: Oct 30, 2013
Posts: 5
Ulf Dittmer wrote:Are you using separate JVMs for James and ActiveMQ? If not, start with that, so that you which component uses up the memory. Also, how much memory are you giving to the JVM? Servers generally need more than the default allocation.

we are getting specifically out of memory error regarding the activemq
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - Exception in thread "ActiveMQ Task-2902" java.lang.OutOfMemoryError: unable to create new native thread
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at java.lang.Thread.start0(Native Method)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at java.lang.Thread.start(Unknown Source)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(Unknown Source)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:149)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
11/11/2013 20:32:08.305 [ActiveMQ Task-2902] ERROR java.lang.ThreadGroup - at java.lang.Thread.run(Unknown Source)
11/11/2013 20:32:23.766 [schedulerFactoryBean_QuartzSchedulerThread] DEBUG o.q.core.QuartzSchedulerThread - batch acquisition of 0 triggers
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - Exception in thread "ActiveMQ Broker[james] Scheduler" java.lang.OutOfMemoryError: unable to create new native thread
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at java.lang.Thread.start0(Native Method)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at java.lang.Thread.start(Unknown Source)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(Unknown Source)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at org.apache.activemq.thread.PooledTaskRunner.wakeup(PooledTaskRunner.java:81)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at org.apache.activemq.store.amq.AMQPersistenceAdapter.checkpoint(AMQPersistenceAdapter.java:366)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at org.apache.activemq.store.amq.AMQPersistenceAdapter$2.run(AMQPersistenceAdapter.java:280)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at java.util.TimerThread.mainLoop(Unknown Source)
11/11/2013 20:32:40.994 [ActiveMQ Broker[james] Scheduler] ERROR java.lang.ThreadGroup - at java.util.TimerThread.run(Unknown Source)
Myyron Murray Latorilla
Ranch Hand

Joined: Dec 10, 2009
Posts: 65

Run Jconsole/JVisualVM to check and monitor the memory usage, then overtime when you get a stabilized memory usage trend chart you can identify the appropriate memory size setting for your JVM. If you don't get a stabilized trend on you memory usage (ex. constant rise on usage), you might have a memory leak and need to check your code for unclosed resources.


OCPJP6
sheshasai sai
Greenhorn

Joined: Oct 30, 2013
Posts: 5
Myyron Murray Latorilla wrote:Run Jconsole/JVisualVM to check and monitor the memory usage, then overtime when you get a stabilized memory usage trend chart you can identify the appropriate memory size setting for your JVM. If you don't get a stabilized trend on you memory usage (ex. constant rise on usage), you might have a memory leak and need to check your code for unclosed resources.


We can't install jdk on the system. Its a customer environment. Is there anything particular in the exception stack I suspect its something to do with Persistance Adapter.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42042
    
  64
I can't tell from your responses whether there is one or more JVMs, or whether you have tried adjusting the memory allocated to the JVM(s)... ?
sheshasai sai
Greenhorn

Joined: Oct 30, 2013
Posts: 5
Sorry, for my late replies, We were trying different approaches.
Currently, we are trying to upgrade to activemq 5.9.0 and see if it helps.

To answer the previous query there is only one jvm, activemq and james run on the same jvm and yes we also changed the heap memory but to no avail.

Thanks for your time and support.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42042
    
  64
Unless the new version of ActiveMQ specifically addresses a memory leak, I doubt that it will change anything. How much memory did the JVM have before, and how much does it have now? Have you taken and analyzed thread and memory dumps to see what happens in the JVM?
 
GeeCON Prague 2014
 
subject: Apache James Out of Memory