powered by Jive Software

Increase java memory


#1

Hi

How i can increase java memory because default is to low??


Memoria de Java

9,55 MB of 63,31 MB (15,1%) used


regards


#2

Have a look at this tutorial: http://www.igniterealtime.org/community/docs/DOC-1033

You’re probably interested in the section that is called ‘heap settings’.


#3

This is an excerpt from the Openfire Installation Guide found in your documentation folder of the Openfire server install folder:

Advanced users may wish to pass in parameters to the Java virtual machine (VM) to customize the runtime environment of Openfire. You can do this by creating vmoptions files in the bin/ directory of your Openfire installation. For the Windows service, you’d create a new text file called openfire-service.vmoptions. Each parameter to the VM should be on a new line of the file. For example, to set the minimum heap size to 512 MB and max VM heap size to 1024 MB, you’d use:

-Xms512m
-Xmx1024m

To create parameters for the normal launcher, create a file called openfired.vmoptions (since the openfire.exe launcher invokes the openfired.exe executable to actually start the server).


#4

I running openfire on fedora 8 x86_64, I have create a file called openfired.vmoptions but don’t increase the memory, also create another file called openfire-service.vmoptions but don’t work, i have restart the service after every change. I create the files in /opt/openfire/bin

regards


#5

as a work around, I ususally uncomment the line in bin/openfire:

INSTALL4J_ADD_VM_PARAMS="-Xmx20g"

note: 20g is what I have.

I have not figure out why *.vmoptions file is sometimes not read.


#6

This is the solution

Add a line like this in /etc/sysconfig/openfire

OPENFIRE_OPTS="-Xms256m -Xmx512m"


#7

Hello

I’m using OpenFire on Ubuntu 8.04.

How can i increase the Java Memory???

Many thx by advance.


#8

check Heap Settings http://www.igniterealtime.org/community/docs/DOC-1033


#9

Hello and many thx for your answer

I’ve checked this page and i’ve added the string in “System Properties” but it unfortunately stay at 63.31 Mb

Could you please help more???

Many thx


#10

You dont have to add this to your System Properties. You should read that doc carefully. There is a link to Openfire Settings. Here, a quote:

Custom Parameters

Advanced users may wish to pass in parameters to the Java virtual machine (VM) to customize the runtime environment of Openfire. You can do this by creating vmoptions files in the bin/ directory of your Openfire installation. For the Windows service, you’d create a new text file called openfire-service.vmoptions. Each parameter to the VM should be on a new line of the file. For example, to set the minimum heap size to 512 MB and max VM heap size to 1024 MB, you’d use:

-Xms512m
-Xmx1024m

To create parameters for the normal launcher, create a file called openfired.vmoptions (since the openfire.exe launcher invokes the openfired.exe executable to actually start the server).


#11

I’m really sorry but i don’t watch any link to Openfire Setting in the quote!

I’ve installed Openfire with the .deb find here:

http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openf ire_3.6.4_all.deb

on an Ubuntu 8.04

Where is the directory of the OpenFire installation??

I’m sorry… to insist


#12

I’m not sure about the deb installation. Maybe you should try to ask LG (the author of these docs) directly.

One more doc http://www.igniterealtime.org/community/docs/DOC-1033

At the bottom there are instructions about openfired.vmoptions file.


#13

Add a line like this in /etc/sysconfig/openfire

OPENFIRE_OPTS="-Xms256m -Xmx512m


This way worked to me in a Centos 5. tnx


#14

Hey guys,

i am pretty new to OpenFire & Jabber Servers. I did install a Server recently and so far its running ok, but a few things like the Java Memory, I would like to sort out.

Currently in the Webinterface it shows max 247,50 MB for Java Memory available. Of what 46 MB are already used. I found a few other posts with simliar questions but I don’t completely understand.

++++++++++++++++++++++++++++

Advanced users may wish to pass in parameters to the Java virtual machine (VM) to customize the runtime environment of Openfire. You can do this by creating vmoptions files in the bin/ directory of your Openfire installation. For the Windows service, you’d create a new text file called openfire-service.vmoptions. Each parameter to the VM should be on a new line of the file. For example, to set the minimum heap size to 512 MB and max VM heap size to 1024 MB, you’d use:

-Xms512m
-Xmx1024m

To create parameters for the normal launcher, create a file called openfired.vmoptions (since the openfire.exe launcher invokes the openfired.exe executable to actually start the server).

++++++++++++++++++++++++++++++++

I read that in a post and tried to understand how to duplicate that. I am running OpenFire on a Win2008 Server. This file what the text says I am supposed to create, where exactly does it have to be ?

And does this file has to be saved as a .txt file or without any specific type in the text editor ? Btw, is there a way to empty the Java Memory at a certain point , even automatically maybe ?

Thanks in advance.

Wolfseye


#15

First, are you saying Openfire is only using 46 MB of 247 available? You should hit refresh every few seconds and check how high it actually climbs. If it is not reaching 247, when you are ok and need not to worry about it. JVM is taking care of itself and cleaning the garbage when it needs (after a particular gap of time).

If you still want to increase JVM memory (i mean only available, not in use, though JVM will take a bit more memory if you make more available), we need to know how you have Openfire running. If it is installed and running as a service, then you need to create **openfire-service.vmoptions **file in /Openfire/bin folder and specify how much min and max memory you want to give. If you are running it via launcher (which is unlikely for a server), then you need to create **openfired.vmoptions **instead. Note this file should be of extension vmoptions, not txt. While saving it in notepad, save it in quotes (“openfire-sevice.vmoptions”). Or you may change txt extension to vmoptions if you enable extension showing in Explorer settings. Make sure it has a blank icon, not a txt icon, in which case you probably have saved it as openfire-service.vmoptions.txt


#16

Thanks very much.By the way, I met a puzzle as follow:

when I increased the jvm heap memory size, a long time later, for about 8 hours, the heap memory size is up to the max size of that configed first. It means that the heap size can raise from time to time until OOM? so, the OOM maybe always exit?

Could you do me a favour and give some suggestions?

Sincerely!


#17

Are you saying that you still get OOM errors after increasing the heap size? Maybe this time it takes longer before the OOM? Probably this means, that you still need more memory or you have memory leak somewhere. What version of Openfire are you using? There were some leaks fixed in 3.8.2 version. Also some plugins can cause this.


#18

Hi there, i just installed openfire 3.8.2 on a windows 7 computer, i’ve had it installed before and older version of openfire… and on windows xp… and had no trouble whatsoever with the vmoption files, now … on windows 7, it seems to just plain ignore those settings… i’m currently running the openfire as a service, i tried the launcher option ( had to make it run as Administrator, although my user has full administrative rights) for the launcher to run correctly, also… the launcher did take on account my vmoption settings… but … in service mode… still nothing…

have u solved a problem similar to this?

Thanks


#19

Hi guys, I’m having memory issues as well. I am running server 2008 64bit and I have Java (JRE) 64bit installed and I installed Openfire 3.8.2. When I edit the openfired.vmoptions (program files(x86)\Openfire\bin) file I cannot go past 1024m (technically the limit is 1580m but that is the absolust most that I can give it before it crashes) . What am I doing wrong? I have read so many posts on here and all of them say that you need 64 bit OS and JRE and you should be able to give it as much memory as you want but mine keeps crashing when I try and give it more then 1024m, any suggestions?

Thank you,

Brad

P.S. I appologize if I posted this in the wrong spot.


#20

David, i see in your screenshot that you’ve tried to create openfire-service.vmoptions file. Have you tried to put same memory values into this file and then run the service version? Works for me.

As about adminstrator thing. This is how Windows 7+ (and maybe also Vista) works. You can’t simply edit files in Program Files, even if you have full admin rights. It always asks for confirmation with UAC dialog. As Openfire has to read/write files in the Program Files/Openfire/conf, logs and embedded-db folder if using internal database, that’s why you have to run launcher with Run as admin command. Same for all programs storing their configuration in Program Files.