• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache James Out of Memory

 
sheshasai sai
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Pie
Posts: 2345
90
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sheshasai Sai,

Welcome to Javaranch!

Can you provide us with TellTheDetails information?

Regard,
Frits
 
sheshasai sai
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sheshasai sai
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sheshasai sai
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic