Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2008, 11:26 AM
Member
 
Join Date: Aug 2008
Posts: 3
jai135 is on a distinguished road
java.lang.OutOfMemoryError: unable to create new native thread
Hi,

Actually I am facing a problem in a web application which relates to java.lang.OutOfMemoryError: unable to create new native thread

Deployment details for the application are -
1. Sun Java System Application Server 7
2. Java 1.4.2_05
3. Solaris 9 (OS)
4. RAM 8 GB

There are 3-4 applications deployed on Sun Server 7. Some times we receive "Out Of Memory" Error while displaying jsp's in one of the applications deployed on Sun-One Server 7. When Sun Server is restarted, the problem is resolved temporarily.
Since the issue occurs on production environment, its not feasible to restart the Sun Server regularly.

We have also set the java parameters as -Xms 3584M & -Xmx 3584M i.e 3.5 GB around.If this parameter is modified ,the site goes down.

Please provide your valuable suggestions.

Jai
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-20-2008, 12:58 PM
DevzAbhi's Avatar
Member
 
Join Date: Jul 2008
Posts: 60
DevzAbhi is on a distinguished road
If i remember correctly solaris 9 is a 32 bit os .. that means the highest memory available for a process is 2 gb .. try config your mem parameters to -Xms 512M & -Xmx 1024M

which will result in early garbage collection . and leave 1 gb of space for application threads
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-20-2008, 01:02 PM
DevzAbhi's Avatar
Member
 
Join Date: Jul 2008
Posts: 60
DevzAbhi is on a distinguished road
PS --> please upgrade your jvm to 1.4.2_11 that is more stable and u will have lesser issues .
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-20-2008, 01:31 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,612
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
I think he's mentioning about the JDK(it's the best word to use ) version. So it's always better to move with the latest version.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 08-20-2008, 01:39 PM
DevzAbhi's Avatar
Member
 
Join Date: Jul 2008
Posts: 60
DevzAbhi is on a distinguished road
Quote:
Originally Posted by Eranga View Post
I think he's mentioning about the JDK(it's the best word to use ) version. So it's always better to move with the latest version.
Thanks for correction......
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 08-20-2008, 02:57 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,612
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
No problem pal. Mistakes can be take at anytime. That's why we are discussing here about different topics all the time.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 08-22-2008, 04:51 PM
Member
 
Join Date: Aug 2008
Posts: 3
jai135 is on a distinguished road
The production site is running on solaris machine so its not possible to use profiler there.

The logs for sun server depicts some error as follows -

[22/Aug/2008:04:16:10] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=32 FreeResources=1 QueueSize=0, Pool [aaidb_0] PoolSize=32 FreeResources=1 QueueSize=0
[22/Aug/2008:04:16:40] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=32 FreeResources=1 QueueSize=0, Pool [aaidb_0] PoolSize=32 FreeResources=1 QueueSize=0
[22/Aug/2008:04:17:10] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=32 FreeResources=1 QueueSize=0, Pool [aaidb_0] PoolSize=32 FreeResources=1 QueueSize=0
[22/Aug/2008:04:17:40] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=32 FreeResources=1 QueueSize=0, Pool [aaidb_0] PoolSize=32 FreeResources=1 QueueSize=0
[22/Aug/2008:04:18:10] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=32 FreeResources=1 QueueSize=0, Pool [aaidb_0] PoolSize=32 FreeResources=1 QueueSize=0
[22/Aug/2008:04:18:40] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:19:10] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:19:40] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:20:10] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:20:40] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:21:10] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:21:26] WARNING (22501): for host 172.16.0.108 trying to GET /robots.txt, send-file reports: HTTP4142: can't find /var/opt/SUNWappserver7/domains/domain1/server1/applications/j2ee-modules/AAI_CMSPROD_1/robots.txt (File not found)
[22/Aug/2008:04:21:40] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:22:15] WARNING (22501): CORE3283: stderr: java.lang.OutOfMemoryError
[22/Aug/2008:04:22:20] SEVERE (22501): MONITORING : Pool [aaidb_1] PoolSize=31 FreeResources=0 QueueSize=0, Pool [aaidb_0] PoolSize=31 FreeResources=0 QueueSize=0
[22/Aug/2008:04:22:28] SEVERE (22501): CORE4007: Internal error: Unexpected Java exception thrown (java.lang.OutOfMemoryError, no description), stack: java.lang.OutOfMemoryError

The above logs depict that as soon as PoolSize becomes 31 from 32 , FreeResources also turn 0 from 1 and this throws OutOfMemoryError. Now the server needs to be restarted which makes the PoolSize again as 8 and the site starts working again.

Does this have to do anything with the entries in server.xml which is as follows in my case -

<jdbc-connection-pool steady-pool-size="8" max-pool-size="32" max-wait-time-in-millis="60000" pool-resize-quantity="2" idle-timeout-in-seconds="300" is-isolation-level-guaranteed="false" is-connection-validation-required="false" connection-validation-method="auto-commit" fail-all-connections="false" datasource-classname="oracle.jdbc.pool.OracleDataSource" res-type="javax.sql.XADataSource">
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 08-22-2008, 05:02 PM
DevzAbhi's Avatar
Member
 
Join Date: Jul 2008
Posts: 60
DevzAbhi is on a distinguished road
See poolsize depicts the number of open connection to the data source . you can try reducing the max pool size to 20 if your performance is not hampered ...did you try the the mem size i wrote ..
wat i can make out from log is the connection to data base require some memory which is not available due to high mem size currently configured .
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 08-22-2008, 05:02 PM
DevzAbhi's Avatar
Member
 
Join Date: Jul 2008
Posts: 60
DevzAbhi is on a distinguished road
and the limitation of os to allocate only 2 gb
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 08-27-2008, 08:09 PM
Senior Member
 
Join Date: Jun 2008
Posts: 484
masijade is on a distinguished road
Solaris 9 is also available in 64 bit. In fact, if I remember right, that is the default as long as the machine it is being installed on can do 64 bit. Also, two gig would not be the limit only to one process, but the system as a whole (unless it is running on a Sun Fire server, where each processor has it's own memory management module, but then it would have to be 64 bit anyway, since all sun Fire servers are purely 64 bit).

As far as I know, you can also get Solaris 8 in 64 bit (but I could be wrong about that one).
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 09-01-2008, 12:51 PM
Member
 
Join Date: Aug 2008
Posts: 3
jai135 is on a distinguished road
Hi,

I reduced the heap size to Xms=512 Xmx=1024.But still I recieved outOfMemory Error.

[01/Sep/2008:13:12:26] SEVERE (17913): MONITORING : Pool [aaidb_1] PoolSize=8 FreeResources=1 QueueSize=0, Pool [aaidb_0] PoolSize=8 FreeResources=1 QueueSize=0
[01/Sep/2008:13:12:28] INFO (17913): CORE3282: stdout: Session Bhadiya..
[01/Sep/2008:13:12:28] INFO (17913): CORE3282: stdout: Action : tenders_cancel
[01/Sep/2008:13:12:28] INFO (17913): CORE3282: stdout: Inside Get Modeltenders_cancel
[01/Sep/2008:13:12:33] SEVERE (17913): StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException
at com.iplanet.ias.web.jsp.JspServlet.service(JspServ let.java:296)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.catalina.core.StandardWrapperValve.invo keServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.acce ss$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.ru n(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor .process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContai ner.java:856)
----- Root Cause -----
java.lang.OutOfMemoryError

[01/Sep/2008:13:12:35] SEVERE (17913): StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException
at com.iplanet.ias.web.jsp.JspServlet.service(JspServ let.java:296)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.catalina.core.StandardWrapperValve.invo keServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.acce ss$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.ru n(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor .process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContai ner.java:856)
----- Root Cause -----
java.lang.OutOfMemoryError


Is there any other configuration that I can try to eliminate this error

Regards
Jai
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 09-01-2008, 12:56 PM
DevzAbhi's Avatar
Member
 
Join Date: Jul 2008
Posts: 60
DevzAbhi is on a distinguished road
please upgrade to jdk 1.4.2_11 i hope it helps.

because i have faced the issue .. on windows .. was able to resolve it after updating the JDK
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.OutOfMemoryError in a web service client elchape Advanced Java 4 06-28-2008 07:21 PM
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space Eku NetBeans 14 06-12-2008 10:36 AM
OutOfMemoryError: Unable to Start New Native Thread edwin11 Advanced Java 0 11-16-2007 03:47 PM
java.lang.OutOfMemoryError with java vector mary New To Java 3 08-03-2007 12:55 PM
java.lang.OutOfMemoryError: Java heap space paul Advanced Java 1 07-25-2007 10:07 PM


All times are GMT +3. The time now is 07:05 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org