We occasionally get some issues with sfs2x. The issue is that clients can connect, they can login to a zone but after that everything is quiet. It seems that all Extension requests are being dropped or ignored or.... What's interesting is that the admin tool is also not displaying any data (but I can login to the admin tool). After stopping and starting smartfox server it usually works ok again, sometimes for 5 minutes but sometimes for 5 days.
I have been searching what is going on but don't have a real clue. My guess is that something goes wrong in the extensioncontrollerthreadpool, maybe all threads in this pool have finished? I have been searching the log for exception etc but haven't found anything weird in the logs.
Any suggestions on how to find the cause of this issue are appreciated.
Extensions not working
Extensions not working
Bart van de Garde
CTO - Ranj Serious Games
CTO - Ranj Serious Games
You are probably having problems with threads.
If you use a database you will need to augment the number of threads for the ExtensionController.
Please read the details here:
http://docs2x.smartfoxserver.com/Advanc ... extensions
If you use a database you will need to augment the number of threads for the ExtensionController.
Please read the details here:
http://docs2x.smartfoxserver.com/Advanc ... extensions
I have looked into this and am quite sure the problem is that the extensioncontroller threads are dead or doing something else/hanging. I do have 5 extension controller threads in the pool. Also the server needs a restart to response again so it is not the case that the threads are temporarily busy.
Is there a way I can figure out what the threads are doing? That would greatly reduce the debug time if this is the problem.
Is there a way I can figure out what the threads are doing? That would greatly reduce the debug time if this is the problem.
Bart van de Garde
CTO - Ranj Serious Games
CTO - Ranj Serious Games
As I should have known I figured this one out myself and found the way to create a threaddump. Now I am logging the console I do see what is going on and that's that a lot warnings a displayed:
17:46:37,089 WARN [com.smartfoxserver.v2.controllers.ExtensionController-5] controllers.ExtensionController -
java.lang.OutOfMemoryError: PermGen space
You really should have the console output send by default to smartfox.log since I was missing critical messages from the java vm.
17:46:37,089 WARN [com.smartfoxserver.v2.controllers.ExtensionController-5] controllers.ExtensionController -
java.lang.OutOfMemoryError: PermGen space
You really should have the console output send by default to smartfox.log since I was missing critical messages from the java vm.
Bart van de Garde
CTO - Ranj Serious Games
CTO - Ranj Serious Games
In the severe case of an OutOfMemory error the JVM might not be able to log anything because it has crashed. That's what the error is saying, essentially.
Are you running SFS2X RC2a? If not please upgrade.
The problem here is that you have filled the Class definition memory. Unless you are doing something wrong in your code this issue was fixed in RC2a
thanks
Are you running SFS2X RC2a? If not please upgrade.
The problem here is that you have filled the Class definition memory. Unless you are doing something wrong in your code this issue was fixed in RC2a
thanks
Hi Lapo,
I am running 2.0.0-RC2a. Increasing the permspace fixed the problem, we might have some code that increases the permspace and are looking into it.
It is very annoying that errors that are displayed on stdout are not displayed in the smartfox.log. You would expect this from a server product so any error that is outputed by the application or jvm can be found. I have adjusted the boot scripts to pipe all the output to a file.
Bart
I am running 2.0.0-RC2a. Increasing the permspace fixed the problem, we might have some code that increases the permspace and are looking into it.
It is very annoying that errors that are displayed on stdout are not displayed in the smartfox.log. You would expect this from a server product so any error that is outputed by the application or jvm can be found. I have adjusted the boot scripts to pipe all the output to a file.
Bart
Bart van de Garde
CTO - Ranj Serious Games
CTO - Ranj Serious Games
An OutOfMemory error is a severe error in the JVM with unpredictable consequences. Evidently the JVM is not able to work anymore, hence the lack of notifications in the SFS logs. 
This error should never show up unless you are keeping references to objects in your code. Make sure to release any object reference like listeners , singletons etc... in your code under the Extension's destroy() method.
This error should never show up unless you are keeping references to objects in your code. Make sure to release any object reference like listeners , singletons etc... in your code under the Extension's destroy() method.