Openfire Java内存不足错误 – 任何解决scheme?

我有Openfire的巨大问题,每时每刻因为缺乏内存而崩溃。 在Java日志中,我有以下错误日志。 然而问题是

  1. Openfire是32位,我不能运行它为64位。
  2. 因为我可以给Openfire的只有32位最大内存是4GB。
  3. 我的系统是非常强大的32 GB RAM,所以我不能再增加
  4. 只有最多100个用户使用openfire,但似乎还不能处理它
  5. 我每5分钟运行一次cron作业来监视这个服务,然后每隔一段时间重新启动一次

任何解决scheme如何优化内存使用开放和停止崩溃?

错误日志如下

# # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 140 bytes for CHeapObj-new # Possible reasons: # The system is out of physical RAM or swap space # In 32 bit mode, the process size limit was hit # Possible solutions: # Reduce memory load on the system # Increase physical memory or swap space # Check if swap backing store is full # Use 64 bit Java on a 64 bit OS # Decrease Java heap size (-Xmx/-Xms) # Decrease number of Java threads # Decrease Java thread stack sizes (-Xss) # Set larger code cache with -XX:ReservedCodeCacheSize= # This output file may be truncated or incomplete. # # Out of Memory Error (allocation.inline.hpp:44), pid=31239, tid=2735213424 # # JRE version: 6.0_41-b02 # Java VM: Java HotSpot(TM) Server VM (20.14-b01 mixed mode linux-x86 ) --------------- THREAD --------------- Current thread (0xad2c7000): JavaThread "Jetty-QTP-AdminConsole-16012" [_thread_in_vm, id=21077, stack(0xa3030000,0xa3081000)] Stack: [0xa3030000,0xa3081000], sp=0xa307f3d4, free space=316k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x727990] 

Openfire是用java编写的,并不是32位的。 如果您使用64位jvm,它将以64位模式运行,您可以尽可能多地使用它。 尝试安装64位jvm / jre