We are running a "app" where we use groovy for some of the code.
groovy, mysql-connector, and a lib with "transfer-classes" (for typed client-server-communication) is deployed in __lib__
One jar with one Zone and two RoomExtensions (and all the implementations for request- and event-handlers) is deployed to the extension-folder.
The rooms are created dynamically as games and get on of the RoomExtensions attached to them.
When monitoring the jvm we see that the PermGem is running full pretty fast (from 1 hour to some hours depends on how fast Rooms are created), until the server doesn't take any requests anymore.
therefore we tuned the instance to run with a lot more PermGemSpace (270MB currently) and activated GarbageCollection for PermGemSpace:
Code: Select all
-XX:MaxPermSize=256m
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
Now it lasts about 10 hours before we have to restart the instance.
Through some digging we think it could be because of a new ClassLoader that loads the RoomExtension each time a room is created.
(And because some things clearly don't get cleaned up even whit garbagecollection)
Question:
- Would it be a solution to deploy Code for the dynamically created Rooms to __lib__, would this stop it from being "reloaded"?
- Is there someone with experience using groovy in combination with sfs2x? over here http://groovy.329449.n5.nabble.com/Anot ... 89594.html
it seems like there could be a problem with "SoftReferences keeping a pointer to Classes" which we will try to handle with another jvm-start-parameter:
Code: Select all
-XX:SoftRefLRUPolicyMSPerMB=150
Some Ideas about it?
-we are recognizing a lot of errors inside "BlueBox.do" when monitoring the app with AppDynamics all with those details:
Code: Select all
org.mortbay.jetty.RetryRequest : null
at org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.suspend(SelectChannelConnector.java:459)
at com.smartfoxserver.v2.bluebox.BlueBox.handlePollingRequest(BlueBox.java:221)
at com.smartfoxserver.v2.bluebox.BlueBox.doPost(BlueBox.java:121)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at com.smartfoxserver.v2.bluebox.SessionFilter.doFilter(SessionFilter.java:141)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
should we worry or why shouldn't we?
I will gladly provide more details if needed,
looking forward for answers