【问题标题】:Application time out when accessing the specific report访问特定报告时应用程序超时
【发布时间】:2016-12-13 21:08:35
【问题描述】:
public HashMap generateMsgFiveDaysCompltdReport(
    final SearchCriteria msgCriteria,
    String[] queueselected, 
    boolean flag) throws SQLException {
    HashMap msgInitiatedData = null;    

    if (logger.isDebugEnabled()) {
        logger.debug("generateMsgInitiatedReport of ReportsDelegate  - start");
    }    

    logReportRun("Requested", msgCriteria.getReportName(),
            msgCriteria.getStartDate(), msgCriteria.getEndDate(),
            msgCriteria.getQueueDesc(), "", msgCriteria.getProfileId());
    TimeTracker tt = new TimeTracker();
    tt.start();
    msgInitiatedData = reportsDAO.generateMsgFiveDaysCompltdReport(msgCriteria, queueselected,flag);
    tt.stop();
    String totalTime = Long.toString(tt.getTotalTime());
    logReportRun("Completed", msgCriteria.getReportName(),
            msgCriteria.getStartDate(), msgCriteria.getEndDate(),
            msgCriteria.getQueueDesc(), totalTime, msgCriteria.getProfileId());  

    if (logger.isDebugEnabled()) {
        logger.info("generateMsgInitiatedReport-End");
    }

    return msgInitiatedData;
}

应用程序调用此方法,并在完成reportsDAO.generateMsgFiveDaysCompltdReport 后显示执行时间。在日志中我可以看到 68-75 秒。但是,它甚至会反复调用此方法,从而导致应用程序超时。由于报告DAO.generateMsgFiveDaysCompltdReport 前后的记录器语句“已请求”和“已完成”,我知道它反复调用。是因为线程挂起还是数据库连接问题?我无法在 SIT/UAT 或 DEV 环境中复制相同的问题。

日志:

[12/12/16 15:32:21:983 EST] 00000049 SystemOut     O 12/12/2016 15:32:21,983 INFO  (com.anthem.central.sm.delegate.ReportsDelegate:618) - Requested the report Messages+Turnaround+in+Business+Days+by+NPI+or+Queue for input criteria [ProfileId:VPurimetla2207, Start Date: 12%2F08%2F2016, End Date: 12%2F09%2F2016, Selected Queue: null]  
[12/12/16 15:32:28:463 EST] 0000004f SystemOut     O 12/12/2016 15:32:28,460 INFO  (com.anthem.central.sm.delegate.ReportsDelegate:618) - Completed the report Messages+Turnaround+in+Business+Days+by+NPI+or+Queue for input criteria [ProfileId:VPurimetla2207, Start Date: 12%2F08%2F2016, End Date: 12%2F09%2F2016, Selected Queue: null] and total time taken is: 66.67 Sec.  
[12/12/16 15:32:57:293 EST] 0000004a SystemOut     O 12/12/2016 15:32:57,292 INFO  (com.anthem.central.sm.action.ValidateUserAction:164) - User has logged on%0A+%28CustomInfo+%3A+%29%0A+%5Brequest+params%3A+none%5D%0A+%3Cuser%3A+HHarriman2642%3E+%7BsessionId%3A+cEKjYeADwPUwmrNRtAoTR5T%7D  
[12/12/16 15:33:00:466 EST] 0000004a SystemOut     O 12/12/2016 15:33:00,465 INFO  (com.anthem.central.sm.dao.QuestionDAO:641) - QuestionDAO.sendClaimsMessage: ICN=ICN%23006390263 msgId=14172673 queueId=202 systemName=BXWGS patientID=LCB863763363  
[12/12/16 15:33:11:959 EST] 0000004f SystemOut     O 12/12/2016 15:33:11,958 INFO  (com.anthem.central.sm.dao.QuestionDAO:641) - QuestionDAO.sendClaimsMessage: ICN=ICN%23006390267 msgId=14172677 queueId=90 systemName=NASCOPAR patientID=UGG9219580610001  
[12/12/16 15:33:22:147 EST] 0000004a SystemOut     O 12/12/2016 15:33:22,147 INFO  (com.anthem.central.sm.delegate.ReportsDelegate:618) - Requested the report Messages+Turnaround+in+Business+Days+by+NPI+or+Queue for input criteria [ProfileId:VPurimetla2207, Start Date: 12%2F08%2F2016, End Date: 12%2F09%2F2016, Selected Queue: null]  
[12/12/16 15:33:24:478 EST] 00000049 SystemOut     O 12/12/2016 15:33:24,477 INFO  (com.anthem.central.sm.delegate.ReportsDelegate:618) - Completed the report Messages+Turnaround+in+Business+Days+by+NPI+or+Queue for input criteria [ProfileId:VPurimetla2207, Start Date: 12%2F08%2F2016, End Date: 12%2F09%2F2016, Selected Queue: null] and total time taken is: 62.49 Sec.  
[12/12/16 15:33:27:687 EST] 00000049 SystemOut     O 12/12/2016 15:33:27,687 INFO  (com.anthem.central.sm.dao.QuestionDAO:641) - QuestionDAO.sendClaimsMessage: ICN=ICN%23006390268 msgId=14172681 queueId=502 systemName=SEVA patientID=YRZ958M62248  
[12/12/16 15:34:22:245 EST] 0000003a SystemOut     O 12/12/2016 15:34:22,244 INFO  (com.anthem.central.sm.delegate.ReportsDelegate:618) - Requested the report Messages+Turnaround+in+Business+Days+by+NPI+or+Queue for input criteria [ProfileId:VPurimetla2207, Start Date: 12%2F08%2F2016, End Date: 12%2F09%2F2016, Selected Queue: null]  
[12/12/16 15:34:28:404 EST] 0000004a SystemOut     O 12/12/2016 15:34:28,404 INFO  (com.anthem.central.sm.delegate.ReportsDelegate:618) - Completed the report Messages+Turnaround+in+Business+Days+by+NPI+or+Queue for input criteria [ProfileId:VPurimetla2207, Start Date: 12%2F08%2F2016, End Date: 12%2F09%2F2016, Selected Queue: null] and total time taken is: 66.26 Sec.  
[12/12/16 15:34:50:717 EST] 0000004f SystemOut     O 12/12/2016 15:34:50,716 INFO  (com.anthem.central.sm.action.ValidateUserMPPSSOAction:147) - prevProfileID hamde2pfs%23 found for DHamlin8008  
[12/12/16 15:34:50:720 EST] 0000004f SystemOut     O 12/12/2016 15:34:50,719 INFO  (com.anthem.central.sm.action.ValidateUserMPPSSOAction:212) - User has logged on%0A+%28CustomInfo+%3A+%29%0A+%5Brequest+params%3A+TargetXML%3DPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48VXNlcj48UHJvdmlkZXJTdGF0ZT5DQTwvUHJvdmlkZXJTdGF0ZT48U1NPSWQ%2BYWthNDAwMzEzODE0MzQ8L1NTT0lkPjxIZWFsdGhQbGFuVXNlcklkPmhhbWRlMnBmczwvSGVhbHRoUGxhblVzZXJJZD48Um9sZT5VU0VSPC9Sb2xlPjxEZWVwbGlua0lkPjwvRGVlcGxpbmtJZD48L1VzZXI%2B%2C+FirstName%3DY807Mmp0%2BuxqPSZGBmCLdQ%3D%3D%2C+LastName%3D2%2Fi%2BFEH6qyKDYDHatADmNA%3D%3D%2C+Email%3DLFKtdhJnLi8tV4k6hkDnO2XTL%2F8GigkELIsfpFEoxvg%3D%5D%0A+%3Cuser%3A+DHamlin8008%3E+%7BsessionId%3A+4sf5VL9IA5I-PF8c3Wgpzw8%7D 

【问题讨论】:

  • 是什么调用了这段代码?所有调用的堆栈都相同吗?如果在 30 秒内没有响应,客户端是否会自动重试?

标签: java oracle11g timeout


【解决方案1】:

但是,它甚至会反复调用此方法,从而导致应用程序超时。由于报告DAO.generateMsgFiveDaysCompltdReport 前后的记录器语句“Requested”和“Completed”,我知道它反复调用。

这表明有东西正在多次调用您的 generateMsgFiveDaysCompltdReport 方法。以你给我们的东西,不可能告诉你为什么会这样。您确定调用您的方法的代码不在某个循环或递归语句的中间吗?

如果您的应用程序附加了调试器,则检查调用堆栈应该会提示您过多调用的来源。

【讨论】:

    【解决方案2】:

    很抱歉发布得太晚了。我是 StackOverflow 的新手

    原因:我自己解决了这个问题,但忘记在这里发布,所以现在就做。 Websphere中有一个ServerIOTimeout设置为60s,如果60s内没有收到响应,会导致webserver再次发起请求。由于我的请求包含导致问题的大约 70 秒左右的数据库查询。由于查询在 20 秒内执行,因此无法在较低环境中复制该问题(数据量非常少)

    解决方法:将serverIOtimeout设置提高到180s即可解决。

    【讨论】:

      猜你喜欢
      • 2018-11-24
      • 2012-05-10
      • 2021-09-18
      • 2014-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多