0

我得到一个 java.lang.OutOfMemoryError: Java heap space on light remote method invocation protocol (and watchdog)。你可以看到下面的日志。有谁知道为什么会发生这种情况以及如何解决?

我尝试的是更改代理、容器、查找服务和管理器的最大堆大小:

export GSA_JAVA_OPTIONS=-Xmx256m  
export GSC_JAVA_OPTIONS=-Xmx8192m  
export GSM_JAVA_OPTIONS=-Xmx4096m  
export LUS_JAVA_OPTIONS=-Xmx4096m  

这也没有帮助。虽然这是有道理的 - 由于 lrmi 相关问题,堆失败,但我没有看到可以帮助我解决它的设置。

2013-10-05 21:01:53,124 GSC SEVERE [com.gigaspaces.lrmi] - exception in main selection loop; Caused by: java.lang.OutOfMemoryError: Java heap space  
    at java.util.HashMap.newKeyIterator(HashMap.java:886)  
    at java.util.HashMap$KeySet.iterator(HashMap.java:920)  
    at java.util.HashSet.iterator(HashSet.java:170)  
    at sun.nio.ch.Util$2.iterator(Util.java:303)  
    at com.gigaspaces.lrmi.nio.selector.handler.AbstractSelectorThread.doSelect(AbstractSelectorThread.java:67)  
    at com.gigaspaces.lrmi.nio.selector.handler.AbstractSelectorThread.run(AbstractSelectorThread.java:51)  
    at java.lang.Thread.run(Thread.java:722)  

2013-10-05 21:02:20,232 GSC SEVERE [com.gigaspaces.lrmi] - exception in main selection loop; Caused by: java.lang.OutOfMemoryError: Java heap space  

2013-10-05 21:02:40,582 GSC SEVERE [com.gigaspaces.lrmi] - exception in main selection loop; Caused by: java.lang.OutOfMemoryError: Java heap space  

2013-10-05 21:04:09,455 gs-space-0.0.2.2 [1] INFO [com.sun.jini.reggie] - unmarshalling failure; Caused by: java.lang.OutOfMemoryError: Java heap space  
2013-10-05 21:04:45,675 GSC SEVERE [com.gigaspaces.lrmi] - exception in main selection loop; Caused by: java.lang.OutOfMemoryError: Java heap space  

2013-10-05 21:04:49,640 GSC SEVERE [com.gigaspaces.lrmi.watchdog] - Unexpected exception in watchdog thread.; Caused by: java.lang.OutOfMemoryError: Java heap space  

2013-10-05 21:05:05,617 gs-space-0.0.2.2 [1] WARNING [com.sun.jini.thread.TaskManager] - GS-JoinManager Task ran [net.jini.lookup.JoinManager$ProxyRegTask@69f9aca2] and caught an exception.; Caused by: java.lang.OutOfMemoryError: Java heap space  
2013-10-05 21:04:47,283 GSC SEVERE [com.gigaspaces.lrmi] - exception in main selection loop; Caused by: java.lang.OutOfMemoryError: Java heap space  

2013-10-05 21:04:40,335 GSC SEVERE [com.gigaspaces.lrmi] - exception in main selection loop; Caused by: java.lang.OutOfMemoryError: Java heap space  

2013-10-05 21:04:51,065  WARNING [com.sun.jini.thread.TaskManager] - GS-LookupDiscovery Task ran [net.jini.discovery.LookupDiscovery$DecodeAnnouncementTask@5164ce69] and caught an exception.; Caused by: java.lang.OutOfMemoryError: Java heap space  
2013-10-05 21:05:21,328 gs-space-0.0.2.2 [1] WARNING [com.sun.jini.thread.TaskManager] - GS-JoinManager Task ran [net.jini.lookup.JoinManager$ProxyRegTask@4a8f3a1d] and caught an exception.; Caused by: java.lang.OutOfMemoryError: Java heap space  
2013-10-05 21:05:14,649 gs-space-0.0.2.2 [1] WARNING [com.sun.jini.thread.TaskManager] - GS-JoinManager Task ran [net.jini.lookup.JoinManager$ProxyRegTask@3787ca39] and caught an exception.; Caused by: java.lang.OutOfMemoryError: Java heap space  
2013-10-05 21:04:48,512 GSC WARNING [com.sun.jini.thread.TaskManager] - GS-LeaseRenewalManager Task ran [net.jini.lease.LeaseRenewalManager$RenewTask@4e833ee2] and caught an exception.; Caused by: java.lang.OutOfMemoryError: Java heap space  
2013-10-05 21:05:51,389 gs-space-0.0.2.2 [1] SEVERE [com.sun.jini.thread.TaskManager] - Ran [net.jini.lookup.JoinManager$ProxyRegTask@7c0469d7] but caught exception:   java.lang.OutOfMemoryError: Java heap space  
Attempt to log caused: ; Caused by: java.lang.OutOfMemoryError: Java heap space  

我有 8 个服务器配置,有 4 个 GSM 的 4 个 LUS 的 16 个 GSC(或 8 个 GSC)、8 个主分区和 8 个备份(或只有 8 个主分区)。当我尝试在空间中一一插入/写入对象时出现错误。当我达到大约 200000 时(第一个达到此数字的分区失败,但上述例外情况除外。我可以看到 RAM 还没有出现 - 那里仍有空间(已使用 8GB - 3.5GB - 大约 4GB 可用空间)。

我还在 GSC 控制台(我在日志中找不到)中看到了一些关于 FastConcurrentSkipListMap 的迭代器导致问题的附加信息:在此处输入图像描述

如果有人喜欢访问 gigaspaces 论坛上的问题,请点击此处

4

1 回答 1

0

问题是 gsc-s 上的 jvm 从未变大,因为我对 .bat 使用了“export”(linux)命令,而不是对环境变量使用了“set”(windows)命令。一旦你使 jvm 堆空间更大,这个问题就会消失。

于 2013-10-10T10:10:53.160 回答