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