用完堆空间 [英] Running out of heap space

查看:187
本文介绍了用完堆空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到堆空间问题。我的程序很简单。有两个actor(发送和接收)发送actor每秒传递10000个对象以接收,并接收发布这些对象。接收器接收的对象被保存在容器中,但容器每秒都被清空。因此容器没有空间耗尽。现在在420000个对象之后,我的日食鞋出现了一个错误,上面写着 ioconsole updater遇到了问题。当我转到详细信息时,我看到错误内部错误:: Java堆空间

I am having a heap space problem. My program is simple. There are two actors (send & receive) "send" actor is passing 10000 objects per second to "receive", and receive publishes those objects. the receivers received object is being saved in the container but the container is being emptied every second. So no chance the container is running out of space. Now after 420000 objects my eclipse shoes an error saying " ioconsole updater has encountered problem" . And when i goto into details i see the error Internal error :: Java heap space

我尝试增加堆大小。
我的堆大小是8096m,maxpermsize是4096

I have tried increasing the heap size. My Heap size is 8096m and maxpermsize is 4096

我正在使用visualVm监控我的代码,我注意到它没有超过堆大小。如何解决问题完全空白。

I am monitoring my code using visualVm and i am noticing that it is not exceeding the heap size atall. Totally blank as how to fix the problem.

有人可以告诉我其他可能的情况会导致此类错误。

Can some one let me know what other possible scenarios can lead to such errors.

推荐答案

IOConsole是一个eclipse类,而不是你的程序。你经常打印到System.out吗?在Window> Preferences下搜索console。为所有控制台缓冲区设置某种限制。尝试从程序中打印较少的输出。也许记录到文件。

IOConsole is an eclipse class, not your program's. Are you printing to System.out a lot? Under Window > Preferences search for "console". Set some sort of limit for all the console buffers. Try printing less output from the program. Maybe log to a file instead.

这篇关于用完堆空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆