websphere ejb壓力測試下,鎖socket的問題

bj15828發表於2009-05-13
應用部署在websphere7.0上。
開一個例項,一個ejb ,例項的記憶體為8g,ejb為5g左右,併發100以上就出現鎖socket的現象。
以上是利用kill -3 生成的javacore檔案。
列印的堆疊如下:(比較長哈~_~)
at com.ibm.rmi.util.buffer.SimpleByteBuffer.flushTo(SimpleByteBuffer.java:192) - locked [9ffffffe87d7eeb8] (a java.net.SocketOutputStream) - locked [9fffffff29698e60] (a com.ibm.rmi.util.buffer.SimpleByteBuffer) at com.ibm.rmi.iiop.IIOPOutputStream.writeTo(IIOPOutputStream.java:532) at com.ibm.rmi.iiop.Connection.write(Connection.java:2127) at com.ibm.rmi.iiop.Connection.sendFragment(Connection.java:2355) at com.ibm.rmi.iiop.IIOPOutputStream.sendFragment(IIOPOutputStream.java:189) at com.ibm.rmi.iiop.CDRWriter.completeFragment(CDRWriter.java:654) at com.ibm.rmi.iiop.CDROutputStream.alignAndReserve(CDROutputStream.java:272) at
...
com.ibm.rmi.io.IIOPOutputStream.simpleWriteObjectInternal(IIOPOutputStream.java:441) at com.ibm.rmi.io.IIOPOutputStream.simpleWriteObjectLoop(IIOPOutputStream.java:469) at com.ibm.rmi.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:526) at com.ibm.rmi.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:168) at com.ibm.rmi.iiop.CDRWriter.write_value(CDRWriter.java:1194) at com.ibm.rmi.iiop.CDRWriter.write_value(CDRWriter.java:1212) at com.ibm.rmi.iiop.CDRWriter.writeAnyOpt(CDRWriter.java:899) at com.ibm.CORBA.iiop.UtilDelegateImpl.writeAny(UtilDelegateImpl.java:365) at javax.rmi.CORBA.Util.writeAny(Util.java:97) at com.adtec.pool.ejb._EJSRemote0SLECAPResPoolBean_c87de11f_Tie.getResData(_EJSRemote0SLECAPResPoolBean_c87de11f_Tie.java) at com.adtec.pool.ejb._EJSRemote0SLECAPResPoolBean_c87de11f_Tie._invoke(_EJSRemote0SLECAPResPoolBean_c87de11f_Tie.java) at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622) at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475) at com.ibm.rmi.iiop.ORB.process(ORB.java:504) at com.ibm.CORBA.iiop.ORB.process(ORB.java:1573) at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2793) at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2662) at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63) at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

監控ejb的執行緒共61,發現wait on condition 12,wait on monitor 49.
其中ejb的物件讀取程式碼如下
public Object getResData(int type, String name) throws BaseException
{
ErrLog eLog;
try
{
isStratResPool();

Object retObj = null;

ConcurrentHashMap resPool = (ConcurrentHashMap)getResPool(type);

if (resPool != null) {
return resPool.get(name);
}

return retObj;
}
catch (BaseException e) {
...
} catch (Exception ex) {
...
}
}

public Object getResPool(int type) throws BaseException
{
ErrLog eLog;
try
{
isStratResPool();

switch (type)
{
case 1:
return PoolManager.getActionHashtable();
...
case 20:
return PoolManager.getTranPathHashtable();
}
try
{
...
} catch (Exception e) {
...
}
}

[該貼被admin於2009-05-13 17:56修改過]

相關文章