English 中文(简体)
Orientdb client using 100% cpu after connection has been established
原标题:
  • 时间:2011-06-07 19:21:17
  •  标签:
  • orientdb

When I use the following code in a servlet running in tomcat7 (also tested in tomcat6) on Ubuntu 10.10 Server (openjdk 1.6.0_20 64bit), the java process uses 100% cpu and above after the connection has been established once.

ODatabaseObjectTx db = ODatabaseObjectPool.global().acquire("remote:localhost/test", "test", "test");
db.getEntityManager().registerEntityClass(BlogPost.class);
List<BlogPost> posts = db.query(new OSQLSynchQuery<BlogPost>("select * from BlogPost order by date desc"));
db.close();

Does anyone know how to resolve this issue?

EDIT: The issue also happens right after acquire. There is a Thread "ClientService" being spawned that causes the high load. I took several thread dumps and it always shows the same for this thread:

"ClientService" daemon prio=10 tid=0x00007f4d88344800 nid=0x558e runnable [0x00007f4d872da000]
   java.lang.Thread.State: RUNNABLE
        at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1239)
        at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
        at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.endResponse(OChannelBinaryAsyn
ch.java:73)
        at com.orientechnologies.orient.client.remote.OStorageRemoteServiceThread.execute(OStorageRemoteServiceThread
.java:59)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:48)

When I suspend the thread in the debugger, the high load stops until I press continue.

最佳回答

Happens after the acquire() or the query?

问题回答

暂无回答




相关问题
OrientDB having trouble with Unicode, Turkish, and enums

I am using a lib which has an enum type with consts like these; Type.SHORT Type.LONG Type.FLOAT Type.STRING While I am debugging in Eclipse, I got an error: No enum const class Type.STRİNG As I am ...

Graph Database to Count Direct Relations

I m trying to graph the linking structure of a web site so I can model how pages on a given domain link to each other. Note I m not graphing links to sites not on the root domain. Obviously this ...

OrientDB create link problem

Can someone please explain me what am I doing wrong here? I can t seem to get the link working. When it creates the link why does it say it created 0 links? and when I want to remove postid why does ...

Is it possible to work with OrientDB using C#?

Are there any implementations, api or examples of OrientDB and C#. The reason I am looking at OrientDB is becuase it s the only one that I found that is a combination of Graph and Document. Any ...

How is the OrientDB used on famous web services?

I saw the presentation http://code.google.com/p/orient/wiki/Presentations. They re talking the product is used on Twitter, Facebook, Amazon, Google.. and etc. What isthe product used for?

热门标签