powered by Jive Software

Multiple Server Admin hangs on second server

I have two Jive servers installed on the same server.

2 different directories

2 different databases

Both start fine on different ports, but after a day or so, sometimes only hours the admin area of the second server does not allow me to login. I enter in the username and password and then hit login and it sits there forever. I have to shutdown the server wait a few seconds and then restart the server and then I can login just fine

I have checked all the logs and have found nothing that aid in finding out what is going on.

Any help would be greatly appreciated.

Thanks!

Randy

Hey Randy,

Can you obtain a thread dump of the JVM of the faulty server? If you are under linux/unix you can execute "kill -3 " and the dump should be in the stdout file or in nohup.out if you started the server with nohup. Once you have the thread dump you can send it to me.

Thanks,

– Gato

yes I will get this to you today.

Thanks!

Randy

How long after a kill -3 does the server actually stop?

I even tried a kill -s 3 8437

Edit: I found info in stdout which I posted below but the server did not stop

Randy

Message was edited by:

randy

Randy,

Could you also try an upgrade to 2.1.2 as a possible solution?

Thanks,

Matt

Actually there was something in stderror

cat stderror.log

Exception in thread “SRT reader” java.lang.OutOfMemoryError: Java heap space

Exception in thread “SAT accept” java.lang.OutOfMemoryError: Java heap space

Exception in thread “Timer-1” java.lang.OutOfMemoryError: Java heap space

Exception in thread “Thread-1” java.lang.OutOfMemoryError: Java heap space

Hey Randy,

AFAIK sending a kill -3 does not stop the process but sends a signal that makes the JVM dump its threads.

From your stderror.log it seems that you need to give more memory to the JVM. Try using -Xmx and set the megs that you need. For “normal” usage 256 would be fine.

Regards,

– Gato

Could you give me more precise instructions on how to give it more memory?

Thanks!

Randy

also how could I figure out what it is now?

Hey Randy,

By default the initial memory size will be of 2MB whilst the maximum size will be 64MB. You will need to set new parameters when starting Messenger. In fact, when starting any Java application you may need to fine tune some parameters related to memory usage and garbage collection.

If you are under windows and you are using messenger.bat to start the server, you will need to edit bin/messenger.bat.

Replace the line:

start “Jive Messenger” “%JAVA_HOME%\bin\java” -jar …\lib\startup.jar

with something like this:

start “Jive Messenger” “%JAVA_HOME%\bin\java” -Xms10m -Xmx256m -jar …\lib\startup.jar

With this settings you are instructing the Java virtual machine to start with an initial memory size of 10 megs and the maximum is 256. If you are under Unix you will then need to edit the messenger.sh file and change the messenger_exec_command variable.

For more information about the JVM arguments you may want to follow these links:

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html#nonstandard

http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html#nonstandard

You can also activate another configuration in the JVM in order to get more information about the current memory consumption. Try passing this argument to the JVM -verbose:gc to get information about the current allocated memory. This information will be very helpful in order to fine tune your installation.

You will get something like this in your stdout file:

GC - Indicates that it was a minor collection (young generation). If it had said Full GC then that indicates that it was a major collection (tenured generation).

325407K - The combined size of live objects before garbage collection.

83000K - The combined size of live objects after garbage collection.

(776768K) - the total available space, not counting the space in the permanent generation, which is the total heap minus one of the survivor spaces.

0.2300771 secs - time it took for garbage collection to occur.

Regards,

– Gato

Here is the line. Would you edit it for me and post it back for me to see?

Thanks!

Randy

nohup “$app_java_home/bin/java” -server -Dinstall4j.jvmDir="$app_java_home" -Dinstall4j.appDir="$app_home" -Dexe4j.moduleName="$prg_dir/$prg" $INSTALL4J_ADD_VM_PARAMS -classpath “$local_classpath” com.install4j.runtime.Launcher start org.jivesoftware.messenger.starter.ServerStarter false false “$prg_dir/…/logs/stderror.log” “$prg_dir/…/logs/stdoutt.log” true true false “” true true 0 0 “” 20 20 “Arial” “0,0,0” 8 500 “version 2.1.1” 20 40 “Arial” “0,0,0” 8 500 -1 -DmessengerHome=$app_home -Dmessenger.lib.dir=$app_home/lib “$@” &

Randy,

It would be something like this:

nohup “$app_java_home/bin/java” -server -Xms10m -Xmx256m -Dinstall4j.jvmDir="$app_java_home" -Dinstall4j.appDir="$app_home" -Dexe4j.moduleName="$prg_dir/$prg" $INSTALL4J_ADD_VM_PARAMS -classpath “$local_classpath” com.install4j.runtime.Launcher start org.jivesoftware.messenger.starter.ServerStarter false false “$prg_dir/…/logs/stderror.log” “$prg_dir/…/logs/stdoutt.log” true true false “” true true 0 0 “” 20 20 “Arial” “0,0,0” 8 500 “version 2.1.1” 20 40 “Arial” “0,0,0” 8 500 -1 -DmessengerHome=$app_home -Dmessenger.lib.dir=$app_home/lib “$@” &

Remember that you may also want to know how much memory your server is consuming. To do that you will need to add -verbose:gc to the command line.

Here is an example:

nohup “$app_java_home/bin/java” -server -Xms10m -Xmx256m -verbose:gc -Dinstall4j.jvmDir="$app_java_home" -Dinstall4j.appDir="$app_home" -Dexe4j.moduleName="$prg_dir/$prg" $INSTALL4J_ADD_VM_PARAMS -classpath “$local_classpath” com.install4j.runtime.Launcher start org.jivesoftware.messenger.starter.ServerStarter false false “$prg_dir/…/logs/stderror.log” “$prg_dir/…/logs/stdoutt.log” true true false “” true true 0 0 “” 20 20 “Arial” “0,0,0” 8 500 “version 2.1.1” 20 40 “Arial” “0,0,0” 8 500 -1 -DmessengerHome=$app_home -Dmessenger.lib.dir=$app_home/lib “$@” &

Regards,

– Gato

I looked it up and our server has 256 MB of ram, does that change the settings?

Thanks

Randy

Randy,

You’'ll need more than that for a server-side Java app.

-Matt

With the server memory that I have what do you think would be a safe amout to up it to?

Randy

Randy,

Perhaps 75 MB? We would recommend that you run Jive Messenger on a server with more memory if at all possible, though.

Regards,

Matt

hm… well, i m still only testing Jive, so i dont have any load problems till now. But, we can use only old IBM (500MHz 64RAM) for our needs. So is this enough for ~ 60 users? With Linux OS. Though i dont think all users will be chating all the time.