Post here your questions about Actionscript and Java server side extensions development.
Moderators: Lapo , Bax
nanohazard
Posts: 7 Joined: 02 Feb 2011, 05:13
Post
by nanohazard » 15 Feb 2011, 08:21
Hi,
would like to know what's wrong with this?
Code: Select all
[ WARNING ] [id: 81] (SmartFoxServer.readIncomingMessages): Generic Exception: java.lang.OutOfMemoryError: Java heap space
Thanks
BigFIsh
Posts: 1698 Joined: 25 Feb 2008, 19:26
Location: New Zealand
Post
by BigFIsh » 15 Feb 2011, 18:06
It may be that your server ran out of its associated java virtual memory (JVM).
See
http://www.smartfoxserver.com/docs/docP ... nced.htm#6 . What parameters did you use (for min/max)?
Also, have you checked memory usage with the admin tool that came with the server? It will indicate how much you have left, and what the maximum value is.
Smartfox's forum is my daily newspaper.
nanohazard
Posts: 7 Joined: 02 Feb 2011, 05:13
Post
by nanohazard » 16 Feb 2011, 14:44
thanks.
I edit also the wrapper.conf in the conf folder.
so far no OutOfMemoryError.
diridam
Posts: 1 Joined: 15 Sep 2009, 14:50
Post
by diridam » 24 Feb 2011, 09:44
Regarding the outOfMemory
I am encountering the folowing problem once every 2 days (concurent connections ~300).
INFO | jvm 1 | 2011/02/24 11:54:28 | Exception in thread "selector" java.lang.OutOfMemoryError
INFO | jvm 1 | 2011/02/24 11:54:28 | at sun.misc.Unsafe.allocateMemory(Native Method)
INFO | jvm 1 | 2011/02/24 11:54:28 | at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:99)
INFO | jvm 1 | 2011/02/24 11:54:28 | at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
INFO | jvm 1 | 2011/02/24 11:54:28 | at it.gotoandplay.smartfoxserver.util.Attachment.<init>(Attachment.java:33)
INFO | jvm 1 | 2011/02/24 11:54:28 | at it.gotoandplay.smartfoxserver.SmartFoxServer.checkNewConnections(SmartFoxServer.java:1317)
INFO | jvm 1 | 2011/02/24 11:54:28 | at it.gotoandplay.smartfoxserver.EventReader.run(EventReader.java:31)
INFO | jvm 1 | 2011/02/24 11:54:28 | at java.lang.Thread.run(Thread.java:619)
The wrapper.conf settings are:
# Java Additional Parameters
wrapper.java.additional.1=-server
wrapper.java.additional.2=-Dfile.encoding=UTF-8
wrapper.java.additional.3=-Djava.util.logging.config.file=logging.properties
wrapper.java.additional.3=-Xms1024M
wrapper.java.additional.4=-Xmx2048M
is there something else should i change in the configs to stop the server runing into outofmemory ?
BigFIsh
Posts: 1698 Joined: 25 Feb 2008, 19:26
Location: New Zealand
Post
by BigFIsh » 24 Feb 2011, 20:35
It's a very complex issue, and I don't really know for sure what could be the root of the problem.
I would suggest looking on google regarding the java.lang.OutOfMemoryError. Here's something I found:
http://www.myhomepageindia.com/index.ph ... error.html
This have been discussed before too. Use the forum's search tool.
If this was occurring once every two days, I wouldn't worry too much about it until it starts occurring more often. If the occurrence increases over time, there could be a possible memory leak somewhere.
Smartfox's forum is my daily newspaper.