简体   繁体   English

OutOfMemory Java

[英]OutOfMemory Java

I have system make to monitoring a multiport hardware and camera, those camera's thread receive data to save images. 我有系统监控多端口硬件和摄像头,这些摄像头的线程接收数据以保存图像。 This system having problem with OutOfMemory, he going allocate memory and have a OutOfMemory in 2 hours, i have 256 MB of heap memory in tomcat. 这个系统有OutOfMemory的问题,他会在2小时内分配内存并有一个OutOfMemory,我在tomcat中有256 MB的堆内存。

Waiting ideias, Ty... 等待的意念,Ty ...

Looks like you have a memory leak in your code, ie you are somewhere keeping references to object you no longer need and thereby prevent them from being garbage collected. 看起来您的代码中存在内存泄漏 ,即您在某处保留对不再需要的对象的引用,从而防止它们被垃圾回收。

To find out which objects are causing the problem and where references to them are kept, use a heap or memory profiler. 要找出导致问题的对象以及保留对它们的引用的位置,请使用堆或内存分析器。

The VisualVM tool that comes with newer JDK versions includes a heap profiler that is sufficient in most cases. 较新的JDK版本附带的VisualVM工具包括一个在大多数情况下足够的堆分析器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM