java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"


 java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

异常名称 : 内存溢出异常
在启动tomcat的时候或者运行过程中抛出以下异常

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "http-bio-80-exec-31"
1
2
解决方法:
1. 在安装tomcat的bin目录下找到catalina.bat文件,打开编辑
2. 在开头加上以下内容

set JAVA_OPTS= -Xms1024M -Xmx1024M -XX:PermSize=256M -XX:MaxNewSize=256M -XX:MaxPermSize=256M
1
-Xms1024M:初始化堆内存大小(注意,不加M的话单位是KB)
-Xmx1029M:最大堆内存大小
-XX:PermSize=256M:初始化类加载内存池大小
-XX:MaxPermSize=256M:最大类加载内存池大小


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM