Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have huge problem with openfire crashing every now and then because of the lack of memory. In java log i have following error log. however problems are

  1. Openfire is 32 bit and i cant run it as 64 bit.
  2. Because its only 32 bit max memory i can give to the openfire is 4GB.
  3. My system is very powerful with 32 GB RAM so i cant increase any more
  4. Only max 100 users are using the openfire but still cant seems to handle it
  5. I have run a cron jobs every 5 min to monitor this service and restart every now and then

any solutions on how to optimize open-fire for memory usage and stop it crashing ?

error log as below

#
# 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 )

---------------  T H R E A D  ---------------

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]
share|improve this question

1 Answer 1

Openfire is written in java and is not 32-bit specific. If you use a 64bit jvm, it will run in 64 bit mode and you can give it as much ram as you have. Try installing a 64bit jvm/jre

share|improve this answer
    
I dotn think so, openfire is a 32bit program to be downloaded, it doesnt have a 64 bit version, so how can it runs as 64 bit ? –  user1179459 Sep 9 '13 at 8:49
1  
use the 32 bit jar files, but use 64 bit java. –  Andrew Domaszek Sep 9 '13 at 13:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.