Java JVM OutOfMemory错误
我收到以下错误,JVM停止运行Java JVM OutOfMemory错误,java,jvm,Java,Jvm,我收到以下错误,JVM停止运行 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java
ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:597)
at com.sun.jndi.ldap.Connection.<init>(Connection.java:215)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1580)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2652)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
Servlet jsp的错误[ContainerBase]Servlet.service()引发异常
java.lang.OutOfMemoryError:无法创建新的本机线程
位于java.lang.Thread.start0(本机方法)
在java.lang.Thread.start(Thread.java:597)处
位于com.sun.jndi.ldap.Connection(Connection.java:215)
位于com.sun.jndi.ldap.LdapClient.(LdapClient.java:118)
位于com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1580)
位于com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2652)
位于com.sun.jndi.ldap.LdapCtx.(LdapCtx.java:293)
位于com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
位于com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
位于com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
位于com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
位于javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
位于javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
位于javax.naming.InitialContext.init(InitialContext.java:223)
位于javax.naming.ldap.InitialLdapContext。(InitialLdapContext.java:134)
我使用的是64位操作系统。我增加了-Xmx和-Xms选项。
这似乎是一个解决办法,JVM将来可能会停止运行。
请提出处理这些问题的替代方法
问候,,
Satti查找内存泄漏!在应用程序上使用探查器查看是否正在泄漏内存。要么代码正常,你的应用只需要更多内存来支持加载,要么内存泄漏,甚至通过增加最大堆大小,最终你会再次看到thopse异常,只比以前晚了一点。你现在和过去是什么-Xmx?检查这个问题:另一种方法是搜索内存泄漏并修补它。但你透露的信息太少,无法提供任何线索。