+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: ElectoServer hangs

  1. #1
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ElectoServer hangs

    Hi,

    I'm having a huge problem with ES. When I start up ES and log in with my first user it works fine. It does find the user from the database and the login handler will return back the ChainAction.OkAndContinue value. However, if I log in another user that does exists in the database as well, it hangs. The client doesn't get a response back from the server. Not sure if the message got lost or whatever. Anyway to determine whether the message did get sent to the client? Sometimes it'll work and both login will succeed but later on, one of the plugins eventually hangs as well.

    Help!

    Cheers,

  2. #2
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Addition:
    For some reason it seems to work on my local machine, everything is fine. But when I upload the files over to production server, there are alot of issues where it hangs alot.

  3. #3
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts

    Please provide the managed object portion of your Extension.xml (with the exact connection details removed). Also, are you remembering to close the connection when you are finished? That was a lesson it took me a while to learn myself.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  4. #4
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not sure what you mean by managed objects, but here is my Extension.xml. Is there a way to determine if the connections are closed properly? I developed the server using java and the client in actionscript. I dont think any where in the java code actually creates a connection. I'm the client (actionscript) developer, so i'm not sure how the connections are being managed there, I could get him to post something if you want to see.

    Code:
    <Extension>
    	<Name>My_Extension</Name>
        <EventHandlers>
        	<LoginHandlers>
    	        <LoginHandler>
    	            LoginHandler
    	            Java
    	            com.my.extensions.handlers.LoginHandler</Path>
    	        </LoginHandler>
            </LoginHandlers>
            <LogoutHandlers>
            	<LogoutHandler>
            		LogoutHandler
            		Java
            		com.my.extensions.handlers.LogoutHandler</Path>
            	</LogoutHandler>
    		</LogoutHandlers>
        </EventHandlers>
        
        	
        		SingleGameManager
        		Java
        		com.my.extensions.plugins.SingleGamePluginManager</Path>
        	</Plugin>
        	
        		ChatManger
        		Java
        		com.my.extensions.plugins.ChatPluginManager</Path>
        		<Variables>
        			
        			<Variable name="schedule_interval" type="Integer">30</Variable>
        			
        			<!-- The number of time you want the schedulecallback to be called
        				Set -1 for infinite executions -->
        			<Variable name="number_of_execution" type="Integer">-1</Variable>
        			
        			
        			<Variable name="language_filter_name" type="String">DefaultExclusiveFilter</Variable>
    			</Variables>
        	</Plugin>
        	
        		EmailManager
        		Java
        		com.my.extensions.plugins.EmailPluginManager</Path>
        	</Plugin>
        	
        		BuddyManager
        		Java
        		com.my.extensions.plugins.BuddyPluginManager</Path>
        	</Plugin>  
        	
        		CatalogManager
        		Java
        		com.my.extensions.plugins.CatalogPluginManager</Path>
        	</Plugin>  
        	
        		MyManager
        		Java
        		com.my.extensions.plugins.MyPluginManager</Path>
        	</Plugin>
        	
        		Tester
        		Java
        		com.my.extensions.plugins.tester.Tester</Path>
        	</Plugin>	
        </Plugins>
    </Extension>

  5. #5
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Some more details:
    My hosting server for ES is on MediaTemple, which is under linux. When we restart ES or Apache things seems to be working, then it'll fail again. Not sure exactly what is going on. Network issues? XML Socket files?? No clue...

    What does work is that I experience no problem when I run ES on my local machine under Windows. I experience no issues at all. Could there be some configuration problems? Maybe the message are always received correctly or sent correctly because it's on a local machine and never need to reach out to the Internet??

    any ideas that I can use towards investigation will help greatly, thanks!

  6. #6
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm also noticing this, not sure if it has any affect on it

    [code]

    -=-=-=-=-=-=-=-
    Starting ElectroServer 4.0.4
    Go to http://www.electro-server.com/ for the newest version.
    -=-=-=-=-=-=-=-
    Computer Information
    Operating System: Linux
    Operating System Architecture: i386
    Processors Available: 4
    Memory Available: 506Mb
    -=-=-=-=-=-=-=-
    Virtual Machine Information
    Virtual Machine Vendor: Sun Microsystems Inc.
    Virtual Machine Version: 1.6.0_03

    ......


    2008-Aug-20 11:03:50:761 - INFO [Thread-30]: Initialize LoginHandler.
    2008-Aug-20 11:03:50:763 - INFO [Thread-30]: Logout Handler initialized....
    2008-Aug-20 11:03:53:840 - ERROR [Thread-30]: failed app
    java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.mortbay.jetty.webapp.WebAppClassLoader.loadCla ss(WebAppClassLoader.java:354)
    at org.mortbay.jetty.webapp.WebAppClassLoader.loadCla ss(WebAppClassLoader.java:325)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unk nown Source)
    at java.lang.Class.getDeclaredConstructors(Unknown Source)
    at org.apache.hivemind.service.impl.BuilderFactoryLog ic.getServiceConstructorsOfLength(BuilderFactoryLo gic.java:146)
    at org.apache.hivemind.service.impl.BuilderFactoryLog ic.instantiateExplicitConstructorInstance(BuilderF actoryLogic.java:115)
    at org.apache.hivemind.service.impl.BuilderFactoryLog ic.instantiateCoreServiceInstance(BuilderFactoryLo gic.java:109)
    at org.apache.hivemind.service.impl.BuilderFactoryLog ic.createService(BuilderFactoryLogic.java:75)
    at org.apache.hivemind.service.impl.BuilderFactory.cr eateCoreServiceImplementation(BuilderFactory.java: 42)
    at org.apache.hivemind.impl.InvokeFactoryServiceConst ructor.constructCoreServiceImplementation(InvokeFa ctoryServiceConstructor.java:62)
    at org.apache.hivemind.impl.servicemodel.AbstractServ iceModelImpl.constructCoreServiceImplementation(Ab stractServiceModelImpl.java:108)
    at org.apache.hivemind.impl.servicemodel.PooledServic eModel.constructPooledService(PooledServiceModel.j ava:210)
    at org.apache.hivemind.impl.servicemodel.PooledServic eModel.obtainPooledService(PooledServiceModel.java :186)
    at org.apache.hivemind.impl.servicemodel.PooledServic eModel.getServiceImplementationForCurrentThread(Po oledServiceModel.java:170)
    at $ISpecificationParser_11be149754e._service($ISpeci ficationParser_11be149754e.java)
    at $ISpecificationParser_11be149754e.parseApplication Specification($ISpecificationParser_11be149754e.ja va)
    at $ISpecificationParser_11be149754f.parseApplication Specification($ISpecificationParser_11be149754f.ja va)
    at $ISpecificationParser_11be1497550.parseApplication Specification($ISpecificationParser_11be1497550.ja va)
    at org.apache.tapestry.services.impl.ApplicationSpeci ficationInitializer.initialize(ApplicationSpecific ationInitializer.java:63)
    at $ApplicationInitializer_11be1497544.initialize($Ap plicationInitializer_11be1497544.java)
    at $ApplicationInitializer_11be1497543.initialize($Ap plicationInitializer_11be1497543.java)
    at $ApplicationInitializer_11be1497547.initialize($Ap plicationInitializer_11be1497547.java)
    2008-Aug-20 11:03:54:443 - ERROR [Thread-30]: failed org.mortbay.jetty.webapp.WebAppConte...badmin-1.0.war!/}
    j

  7. #7
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    another thing we are noticing, maybe it's related to closing connections?? Upon logging out, I get this error message

    Code:
    2008-Aug-20 12:04:02:322 - ERROR [pool-1-thread-9]: Exception processing message LogOutMessage -id:5
    java.lang.RuntimeException: Logging out but dropping only the current connection to the server is not supported
            at com.electrotank.electroserver4.servers.registry.transactions.LogOutTransaction.execute(LogOutTransaction.java:40)
            at com.electrotank.electroserver4.servers.registry.transactions.SinglePersonTransaction.execute(SinglePersonTransaction.java:23)
            at com.electrotank.electroserver4.servers.registry.transactions.SinglePersonTransaction.execute(SinglePersonTransaction.java:13)
            at com.electrotank.electroserver4.servers.registry.transactions.TransactionHandler.processMessage(TransactionHandler.java:168)
            at com.electrotank.electroserver4.servers.registry.GatewayIoHandler.messageReceived(GatewayIoHandler.java:224)
            at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
            at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
            at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
            at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
            at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:219)
            at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:263)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    2008-Aug-20 12:04:02:323 - ERROR [pool-1-thread-9]: Exception processing message LogOutMessage -id:5
    com.electrotank.electroserver4.servers.registry.MessagingException: Exception processing message LogOutMessage -id:5
            at com.electrotank.electroserver4.servers.registry.transactions.TransactionHandler.processMessage(TransactionHandler.java:171)
            at com.electrotank.electroserver4.servers.registry.GatewayIoHandler.messageReceived(GatewayIoHandler.java:224)
            at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
            at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
            at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
            at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
            at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:219)
            at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:263)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.RuntimeException: Logging out but dropping only the current connection to the server is not supported
            at com.electrotank.electroserver4.servers.registry.transactions.LogOutTransaction.execute(LogOutTransaction.java:40)
            at com.electrotank.electroserver4.servers.registry.transactions.SinglePersonTransaction.execute(SinglePersonTransaction.java:23)
            at com.electrotank.electroserver4.servers.registry.transactions.SinglePersonTransaction.execute(SinglePersonTransaction.java:13)
            at com.electrotank.electroserver4.servers.registry.transactions.TransactionHandler.processMessage(TransactionHandler.java:168)
            ... 10 more

  8. #8
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Solved it. Apparently, we set the max thread pool to be 5 and I guess not enough threads to do the work. We increased it to a fairly large number and seems to be working fine. what's a good number to set it as? Please tell me it's not one thread per connection.

  9. #9
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Where did you set the max thread pool to 5? (we need the context)
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  10. #10
    Member
    Join Date
    Feb 2008
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    General Settings -> Edit Thread Settings -> Maximum Pool size from the web admin tool.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts