db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join

100% cpu in client-server when database not closed on exit

  •  09-29-2007, 08:23 PM

    100% cpu in client-server when database not closed on exit

    Hello,

     

    Sorry for the new thread, but the first one I posted became somewhat unclear.


    In client-server mode, it seems that CPU is going to 100% on the server thread when some client exits without closing its connection. I think, if this is right, that it is a very annoying problem, as this is something that always could happen (application crash, network connection lost, whatever).

    I tested it under a 6.3 release, with jdk 1.6.2 under Windows Vista.

    Here is the code I use to setup the database on the server:

            objectServer = Db4o.openServer(DB4O_FILENAME, DB4O_PORT);       
            objectServer.grantAccess(DB4O_USER, DB4O_PASSWORD);
            dbClient = Db4o.openClient(DB4O_HOST, DB4O_PORT, DB4O_USER, DB4O_PASSWORD);


    And here is my connection code on the client:

            dbClient = Db4o.openClient(DB4O_HOST, DB4O_PORT, DB4O_USER, DB4O_PASSWORD);

     Whenever I kill the client jvm (or if it exits without calling dbClient.close() ), the server process takes a lot of cpu :-(

     Any idea? 

View Complete Thread