问题描述:下载电子报表,当电子报表过大发生"Root cause of ServletException java.lang.OutOfMemoryError" 问题状态:已解决 解决方法:调整bea/weblogic/common中CommEnv中参数 :sun if "%PRODUCTION_MODE%" == "true" goto sun_prod_mode set JAVA_VM=-client set MEM_ARGS=-Xms256m -Xmx512m -XX:MaxPermSize=256m set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none goto continue :sun_prod_mode set JAVA_VM=-server set MEM_ARGS=-Xms256m -Xmx512m -XX:MaxPermSize=256m goto continue 即解决此问题 reference: MaxPermSize: The permanent space is memory allocated outside the regular heap (i.e. in addition to the -Xmx setting), so it is important to ensure there is enough physical RAM on the machine. The permanent space is used to primarily store classes and objects created for reflection support (methods etc.). If you have a large number of classes in a Java application, an OOM can occur if the PermSize is too small. From one of your previous posts, you seem to have 8 applications, so yes, setting the PermSize and/or MaxPermSize could help. Also, 256MB sounds small for a server with 8 applications. The OOM could simply indicate that your heap is too small. Hope this helps, Arunabh ![](http://tech.ccidnet.com/art/3741/20051019/down_info.asp?id=50197) 项目太大,启动weblogic后不能登录项目.报错java.lang.OutOfMemoryError, 网上找资料,大体是说超出java VM默认设置的最大内存了吧! 有很多方法 1. 在weblogic81/common/bin/commEnv.sh中配置 MEM_ARGS="-Xms32m -Xmx200m -XX:MaxPermSize=128m" -Xms:内存初始值 -Xmx:内存最大值(不要超过内存的80%) MaxPermSize:PermGen(Class和Meta存放区域)区域内存最大值。 可调整为: MEM_ARGS="-Xms512m -Xmx512m -XX:MaxPermSize=256m" 发现commEnv.sh 中有好几处设置MEM_ARGS的地方,不懂只好都改了 2. startWebLogic.cmd中设置java命令行的参数 startWebLogic.cmd 这个方法简单,但是想用Eclipse调试,于是用Eclipse启动Weblogic又报错了. 3.那改改Eclipse启动Weblogic的参数吧 一看就明白了...^_^ 设置JDK属性 |