页面截图信息
抓取到的报错信息
20:44:55[AWT-EventQueue-0] ERROR - sql:select l.pk_workingtasklog from pub_workingtasklog l join pub_alertregistry r on l.pkregistry=r.pk_alertregistry where l.tasktypein (1,2)and r.groupidin ('0001A1100000000003DA', 'GLOBLE00000000000000') order by l.endtime desc the resultsetProcessor error!Read too much data from database for one time!!(-1):300000
nc.bs.dao.DAOException: sql:select l.pk_workingtasklog from pub_workingtasklog l join pub_alertregistry r on l.pkregistry=r.pk_alertregistry where l.tasktypein (1,2)and r.groupidin ('0001A1100000000003DA', 'GLOBLE00000000000000') order by l.endtime desc the resultsetProcessor error!Read too much data from database for one time!!(-1):300000
at nc.bs.dao.BaseDAO.executeQuery(BaseDAO.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at nc.bs.framework.aop.rt.MethodProceedingJoinpoint$3.invoke(MethodProceedingJoinpoint.java:74)
at nc.bs.framework.aop.rt.MethodProceedingJoinpoint.proceed(MethodProceedingJoinpoint.java:184)
at nc.bs.framework.server.SecurityAspect.aroundMethod1(SecurityAspect.java:55)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at nc.bs.framework.aop.rt.AdviceHolder.invoke(AdviceHolder.java:182)
at nc.bs.framework.aop.rt.MethodProceedingJoinpoint.proceed(MethodProceedingJoinpoint.java:129)
at nc.bs.framework.aop.rt.MethodProceedingJoinpoint.proceed(MethodProceedingJoinpoint.java:135)
at nc.bs.framework.aop.rt.AspectedProxy.invoke(AspectedProxy.java:59)
at com.sun.proxy.$Proxy57.executeQuery(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:613)
at nc.bs.framework.rmi.server.RMIHandlerImpl.invokeBeanMethod(RMIHandlerImpl.java:410)
at nc.bs.framework.rmi.server.RMIHandlerImpl.doHandle(RMIHandlerImpl.java:177)
at nc.bs.framework.rmi.server.RMIHandlerImpl.handle(RMIHandlerImpl.java:99)
at nc.bs.framework.comn.serv.CommonServletDispatcher.doPost(CommonServletDispatcher.java:45)
分析报错原因及处理
在数据库中查询 pub_workingtasklog 表的数据量,显示数量超过30万
SELECT count(*) FROM pub_workingtasklog
报错原因:
NC的查询语句没有优化,当数据量很大时会报超时查询错误。
处理方法:
增加定时任务,定期删除 pub_workingtasklog 表的数据。