国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
java.lang.OutOfMemoryError:unable to create native thread
userphoto

2009.06.02

關注

Problem
The java.lang.OutOfMemoryError is sometimes used by Java? to indicate that a resource is constrained. It does not always mean that the Java heap is unable to fulfill a heap allocation request.

The following java.lang.OutOfMemoryError is issued by Java because it cannot create a new Java thread as requested.

[14/03/03 14:55:55:508 GMT-07:00] 5062d9 WebGroup X Servlet Error: unable to create new native thread: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start(Native Method)
at com.sun.jndi.ldap.Connection.<init>(Connection.java:240)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:113)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2307)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:211)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:79)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:83)
at com.com.utilities.ldap.LDAPManipulate.getContext(LDAPManipulate.java:393)

When this error occurs, the verbose garbage collection (GC) data does not likely indicate a memory leak is occurring. It might show that there is plenty of heap memory available.
 
Cause
In this case, the java.lang.OutOfMemoryError is caused by excessive threads being created. There are various reasons why the number of threads is excessive. Here are some possible causes for this exception:
 
Solution
There are a few things to do if you encounter this exception.
Use the lsof -p PID command (Unix? platforms) to see how many threads are active for this process.


Determine if there is a maximum number of threads per process defined by the operating system. If the limit is too low for the application, try raising the per-process thread limit.


Examine the application code to determine if there is code that is creating threads or connections (such as LDAP connections) and not destroying them. You could dump the Java? threads to see if there are an excessive number has been created.


If you find that too many connections are opened by the application, make sure that any thread that the application creates is destroyed.

An enterprise application (.ear) or Web application (.war) runs under a long-running JVM?. Just because the application is finished does not mean that the JVM process ends. It is imperative that an application free any resources that it allocates.

Another solution would be for the application to use a thread pool to manage the threads needed.

本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現有害或侵權內容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
java.lang.OutOfMemoryError: unable to create new native thread內存泄漏分析--備忘
JVM 系列二:java.lang.OutOfMemoryError: unable to create new native thread
Matlab java.lang.OutOfMemoryError
jvm內存調優(yōu)經驗總結
常見的 OOM 異常分析(硬核干貨)
解決 - java.lang.OutOfMemoryError: unable to create new native thread
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服