查询分析器中执行查询语句导致实例宕机原创
2人赞赏了该文章
567次浏览
编辑于2020年05月07日 15:00:36
EAS实例内存溢出导致宕机,有heapdump日志产生。日志如下:
JdbcRowSet下有3千多个com/kingdee/jdbc/rowset/impl/Row,每个都包含大
对象SerialBlob。
查看堆栈信息,如下:
RPC-205 at java.util.Arrays.copyOfRange([CII)[C (Arrays.java:3664) at java.lang.StringBuffer.toString()Ljava/lang/String; (StringBuffer.java:669) at com.kingdee.bos.sql.shell.KDResultSet.readOracleClob(Loracle/sql/CLOB;)Ljava/lang/String; (KDResultSet.java:461) at com.kingdee.bos.sql.shell.KDResultSet.getObject(I)Ljava/lang/Object; (KDResultSet.java:341) at com.apusic.jdbc.adapter.ResultSetHandle.getObject(I)Ljava/lang/Object; (ResultSetHandle.java:329) at com.kingdee.jdbc.rowset.impl.JdbcRowSet.populate(Ljava/sql/ResultSet;IIZ)I (JdbcRowSet.java:178) at com.kingdee.jdbc.rowset.impl.JdbcRowSet.populate(Ljava/sql/ResultSet;I)V (JdbcRowSet.java:120) at com.kingdee.eas.fm.common.app.FMIsqlFacadeControllerBean._executeSql(Lcom/kingdee/bos/Context;Ljava/lang/String;)Lcom/kingdee/eas/base/core/SqlResult; (FMIsqlFacadeControllerBean.java:151) at com.kingdee.eas.fm.common.app.AbstractFMIsqlFacadeControllerBean.executeSql(Lcom/kingdee/bos/Context;Ljava/lang/String;)Lcom/kingdee/eas/base/core/SqlResult; (AbstractFMIsqlFacadeControllerBean.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Method.java:498) at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (TxInvokerBean.java:125) at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.INVOKE_SUPPORTS(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (TxInvokerBean.java:64) at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean_LocalObjectImpl_2.INVOKE_SUPPORTS(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source) at com.kingdee.bos.transaction.EJBTransactionProxy.invoke(Ljava/lang/reflect/Method;[Ljava/lang/Object;I)Ljava/lang/Object; (EJBTransactionProxy.java:180) at com.kingdee.bos.transaction.EJBTransactionProxy.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (EJBTransactionProxy.java:325) at com.sun.proxy.$Proxy1064.executeSql(Lcom/kingdee/bos/Context;Ljava/lang/String;)Lcom/kingdee/eas/base/core/SqlResult; (Unknown Source) at com.kingdee.eas.fm.common.FMIsqlFacade.executeSql(Ljava/lang/String;)Lcom/kingdee/eas/base/core/SqlResult; (FMIsqlFacade.java:51) at rpc_generate._PROXY_com_1_kingdee_1_eas_1_fm_1_common_1_IFMIsqlFacade.pi8(Ljava/io/ObjectInput;Lcom/kingdee/bos/rpc/performance/InvokeRecord;)Lcom/kingdee/bos/rpc/impl/InvokeResult; (Unknown Source) at rpc_generate._PROXY_com_1_kingdee_1_eas_1_fm_1_common_1_IFMIsqlFacade.processInvoke(ILjava/lang/String;Ljava/io/ObjectInput;Lcom/kingdee/bos/rpc/performance/InvokeRecord;)Lcom/kingdee/bos/rpc/impl/InvokeResult; (Unknown Source) at com.kingdee.bos.rpc.impl.ObjectProxy.processInvoke(Ljava/io/ObjectInput;Lcom/kingdee/bos/rpc/performance/InvokeRecord;)Lcom/kingdee/bos/rpc/impl/InvokeResult; (ObjectProxy.java:177) at com.kingdee.bos.rpc.impl.RPCService.serviceInvoke(Ljava/io/DataInputStream;Ljava/io/DataOutputStream;Lcom/kingdee/bos/rpc/performance/InvokeRecord;Lcom/kingdee/bos/rpc/io/server/IServer;)V (RPCService.java:800) at com.kingdee.bos.rpc.impl.RPCService.service(Lcom/kingdee/bos/rpc/io/InvokeHelper;)V (RPCService.java:141) at com.kingdee.bos.rpc.impl.ServiceDispatcher.run()V (ServiceDispatcher.java:153) at java.util.concurrent.Executors$RunnableAdapter.call()Ljava/lang/Object; (Executors.java:511) at java.util.concurrent.FutureTask.run()V (FutureTask.java:266) at com.kingdee.bos.rpc.impl.ThreadPoolExecutorReImpl.runWorker(Lcom/kingdee/bos/rpc/impl/ThreadPoolExecutorReImpl$Worker;)V (ThreadPoolExecutorReImpl.java:1152) at com.kingdee.bos.rpc.impl.ThreadPoolExecutorReImpl$Worker.run()V (ThreadPoolExecutorReImpl.java:622) at java.lang.Thread.run()V (Thread.java:745)
由上述日志信息,可判断,内存主要占用为一个3000多行的查询记录占用了2G多内存,因为查询记录中有blob的二进制字段太大导致3000多条就占用了2G多内存;一般可能是查询工作流定义的表,查询语句用的*号,查询了全部字段,包括工作流定义字段(该字段为二进制字段,很大);而堆栈信息中的com/kingdee/eas/fm/common/app/FMIsqlFacadeControllerBean._executeSql信息可确认,该查询是在查询分析器中执行的。
解决方法:
更新补丁PT145294,该补丁无法限制查询,会提示用户目前查询的表为数据量大或者大字段表,有引起实例宕机风险,建议到数据库上查询。
ps:附件为EAS包含大字段的标准表。如暂时无法更新补丁,可通知现场实施以及客户管理员避免在查询分析器中查询大量数据或查询的数据中含有blob字段;如确实需查询,建议直接从数据库中进行查询。
大字段表.docx(27.62KB)
赞 2
2人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读