Project

General

Profile

OutOfMemoryError

firstime firstime
Added almost 5 years ago

Hello, everyone:

I got one error as following, who can help me? Thanks very much.

2014-03-20 02:57:07 ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "in_47-cl-comp" exception

java.lang.OutOfMemoryError: Direct buffer memory

at java.nio.Bits.reserveMemory(Bits.java:658)

at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)

at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)

at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:174)

at sun.nio.ch.IOUtil.write(IOUtil.java:131)

at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:483)

at java.nio.channels.SocketChannel.write(SocketChannel.java:493)

at tigase.io.SocketIO.write(SocketIO.java:343)

at tigase.net.IOService.writeData(IOService.java:989)

at tigase.xmpp.XMPPIOService.writeRawData(XMPPIOService.java:281)

at tigase.xmpp.XMPPIOService.processWaitingPackets(XMPPIOService.java:217)

at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:580)

at tigase.cluster.ClusterConnectionManager.writePacketToSocket(ClusterConnectionManager.java:882)

at tigase.cluster.ClusterConnectionManager.processPacket(ClusterConnectionManager.java:408)

at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1353)

The attachments is my config file. The memeory of my computer is 64G, and my os is CentOS release 6.3 (Final).

tigase.conf (612 Bytes) tigase.conf

Replies (6)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam almost 5 years ago

Hi, This is strange to get this error with your current settings. Please check following:

  1. Remove perm size settings from your config: -XX:PermSize=64m -XX:MaxPermSize=512m. You do not need them, let them to be set automatically by JVM.

  2. Make sure your installation really uses the config file you attached and not some other one, or a default settings

  3. Are you running this on VM? If yes, what kind of VM?

  4. Does the OOM happens just after start or after some time of normal work?

  5. How many online users do you have on the machine? How many of them are Bosh users?

  6. Could you try Java from Oracle instead of OpenJDK?

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 5 years ago

Could you also add information which version of Tigase XMPP Server are you using?

Adding information about used Java version also could be helpful.

Added by firstime firstime almost 5 years ago

My Tigase XMPP Server is 5.1.0, and my Java version info is following:

java version "1.7.0_19"

OpenJDK Runtime Environment (rhel-2.3.9.1.el6_4-x86_64)

OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

And about other questions of Artur Hefczyc:

  1. OOM happens just after some time of normal work. and, it happens very few.

  2. My online users is over 50,000. And, there is no bosh users.

  3. I am sorry that i don't understand your idea.

Then, thanks a lot.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam almost 5 years ago

  1. My online users is over 50,000. And, there is no bosh users.

Ok, so this is quite big installation, however memory settings seem more than enough for this. Have you tried to adjust configuration as suggested above?

  1. I am sorry that i don't understand your idea.

You use OpenJDK which, from our tests and experience, is less stable and causes some problems with I/O. Therefore we recommend to use Oracle's Java instead: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Try the latest Java7, not the Java8. Java8 has been just released and is not well tested yet.

FYI, Java was invented and created by SUN company which was later bought out by Oracle, therefore, so Java belongs to Oracle now.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 5 years ago

I would also suggest to change JDK from OpenJDK to OracleJDK, but I think it may not be enough.

I remember that we had an issue with release 5.1.0 running on JDK7 which caused to throw OutOfMemoryError due to changes of handling direct memory buffers in Java7. I was working on a fix for this issue (see message of following commit: https://projects.tigase.org/projects/tigase-server/repository/revisions/58af01ae7bb9fa531d63959ef13eb10b2d61a65b), which was finally released as part of Tigase XMPP Server 5.2.0. So I would also suggest to think about possible upgrade of Tigase XMPP Server to 5.2.0 release.

Added by firstime firstime almost 5 years ago

Ok, thanks, i'll try it.

    (1-6/6)