[英]How to check the Ice thread wait on object
When i use jstack to check the process,i have got this log: 当我使用jstack检查进程时,我得到了以下日志:
"poolTaskThread-4" prio=10 tid=0x00007f09300ff800 nid=0x69ce in Object.wait() [0x00007f0aa5271000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at IceInternal.Outgoing.invoke(Outgoing.java:147)
- locked <0x0000000711754358> (a IceInternal.Outgoing)
at com.example.srv.slice._ContentSearchServiceDelM.searchContentsFields(_ContentSearchServiceDelM.java:188)
at com.example.srv.slice.ContentSearchServicePrxHelper.searchContentsFields(ContentSearchServicePrxHelper.java:665)
at com.example.srv.slice.ContentSearchServicePrxHelper.searchContentsFields(ContentSearchServicePrxHelper.java:629)
at com.example.srv.api.ContentSearchServiceAPI.searchContentsFields(ContentSearchServiceAPI.java:61)
at com.bbs.dao.ContentDao.getSortedContentsByNode(ContentDao.java:921)
at com.bbs.dao.ContentDao.getPublishContentListPage(ContentDao.java:613)
at com.bbs.service.ContentService.getPublishContentListPage(ContentService.java:60)
at com.example.service.impl.FindSummImpl.getArtificialContentList(FindSummImpl.java:227)
at com.example.service.impl.FindSummImpl.sortList(FindSummImpl.java:316)
at com.example.service.impl.MatcherImpl$PluginTask.dosortlist(MatcherImpl.java:654)
at com.example.service.impl.MatcherImpl$PluginTask.getPluginContentByQuery(MatcherImpl.java:720)
at com.example.service.impl.MatcherImpl$PluginTask.call(MatcherImpl.java:589)
at com.example.service.impl.MatcherImpl$PluginTask.call(MatcherImpl.java:472)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
and have many others like this.First i think this is because of the ice connection timeout setting problem ,because i find the Outgoing.java in line 147 is like this: 并有很多其他类似的方法。首先,我认为这是由于冰连接超时设置问题引起的,因为我发现第147行中的Outgoing.java是这样的:
int timeout = connection.timeout();
while(_state == StateInProgress && !timedOut)
{
try
{
if(timeout >= 0)
{
wait(timeout);
if(_state == StateInProgress)
{
timedOut = true;
}
}
else
{
wait();
}
}
catch(InterruptedException ex)
{
}
}
}
if(timedOut)
{
//
// Must be called outside the synchronization of
// this object
//
connection.exception(new Ice.TimeoutException());
//
// We must wait until the exception set above has
// propagated to this Outgoing object.
//
synchronized(this)
{
while(_state == StateInProgress)
{
try
{
wait(); //147 line
}
catch(InterruptedException ex)
{
}
}
}
}
so i have add the paras Ice.Override.Connection=200000,but the problem appeared sooner,what should i do about the ice thread~~ 所以我添加了参数Ice.Override.Connection = 200000,但是问题很快出现了,我应该如何处理冰线程~~
The Ice has a paramters is called Ice.CacheMessageBuffer,you can setting this Ice中有一个参数叫做Ice.CacheMessageBuffer,可以设置这个
Ice.CacheMessageBuffers=0
this will not call the directbuffer , you can try it ,it will improve the JVM GC . 这不会调用directbuffer,您可以尝试一下,它将改善JVM GC。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.