weblogic、jdk1.5内存问题
我正在为我的应用程序使用 weblogic 9.2、jdk1.5 和 oracle 10g,并遇到一些内存问题
我有一个报告 servlet,用于 4 种不同类型的数百万数据库记录的报告
现在我的问题是,当我运行报告时一次(单用户),没有发生内存问题,比如
执行报告时内存为 775 mb 当报告完成执行时内存为 836 mb
现在,
并发用户请求报告的速度越快,
即使在每个报告结束后,内存泄漏也会开始,只有很少的内存被回收,例如
报告执行时内存为 33 mb 当报告完成执行时,内存为 86 mb
,它永远保持在 86mb,直到下一个请求出现 java.lang.OutOfMemoryError
我在每个报告执行结束后调用了 System.gc,但它只下降到 86mb
~ 我正在实例化一个报告对象每个请求的 servlet 的 post 方法内部
I am using weblogic 9.2, jdk1.5, and oracle 10g for my application and getting some memory issues
I have a report servlet for 4 different kinds of reports of millions of db records
Now my problem is this, that when I run the report one at a time (single user), no memory issue occurs say
when report was executing memory was 775 mb
when report finish executing memory was 836 mb
Now
sooner the concurrent users request for the reports the memory leakage starts
even after the end of each report only few memory is reclaimed say
when reports was executing memory was 33 mb
when reports finish executing memory was 86 mb
it stays on 86mb forever until next request gets java.lang.OutOfMemoryError
I have called System.gc after the end of each report execution but it only gets down to a 86mb
~ I am instantiating a report object inside servlet's post method for each request
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的堆使用 Xmx 和 Xms 设置为多少
看起来您在运行报表时创建了很多临时对象,这些对象驻留在 Eden 空间(在 Young 空间内)。这些可以通过改变 Xms 相对于 Xmx 的值来调整。
也许当并发用户访问您的应用程序时,会出现对底层数据库或其他任何内容的资源争用。
我建议您使用 VisualVM 或 YourKit 分析您的应用程序。另请阅读内存泄漏问题排查
What is your Heap set to with Xmx and Xms
Looks like you are creating a lot of temporary objects when running your report which reside in the Eden space (within Young space). These can be tuned by changing values of Xms with respect to Xmx.
Maybe when concurrent users hitting your app are having resource contention to underlying database or whatever else.
I suggest you profile your application with VisualVM or YourKit. Also read Troubleshooting Memory Leaks