宅男在线永久免费观看网直播,亚洲欧洲日产国码无码久久99,野花社区在线观看视频,亚洲人交乣女bbw,一本一本久久a久久精品综合不卡

全部
常見問(wèn)題
產(chǎn)品動(dòng)態(tài)
精選推薦

Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: interrupt (xxl-job)

管理 管理 編輯 刪除

org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: interrupt

最近在生產(chǎn)發(fā)現(xiàn)一個(gè)定時(shí)任務(wù),總是報(bào)這個(gè)錯(cuò)誤!如下日志

2021-01-21 13:44:56 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[134]-[Thread-14579] 監(jiān)控當(dāng)前設(shè)備 subsystemCode = xm_jffc_rddstcc, devId= 1629, devName = 1號(hào)門3號(hào)道進(jìn)口欄桿機(jī),newStatus = 01, DeviceFaultRecord is null = true,
2021-01-21 13:44:56 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#handleNormalDevice]-[211]-[Thread-14579] handleNormalDevice 執(zhí)行,  subsystemCode= xm_jffc_rddstcc, devId= 1629, deviceFaultRecord is null :true
2021-01-21 13:44:56 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[88]-[Thread-14579] 監(jiān)控設(shè)備狀態(tài)所在的項(xiàng)目 code = [xm_jffc_rddstcc] ,name = [(一路)瑞達(dá)大廈停車場(chǎng)], devId= 1630,onlineStatus = null
2021-01-21 13:44:57 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[134]-[Thread-14579] 監(jiān)控當(dāng)前設(shè)備 subsystemCode = xm_jffc_rddstcc, devId= 1630, devName = 1號(hào)門1號(hào)道進(jìn)口欄桿機(jī),newStatus = 01, DeviceFaultRecord is null = true,
2021-01-21 13:44:57 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#handleNormalDevice]-[211]-[Thread-14579] handleNormalDevice 執(zhí)行,  subsystemCode= xm_jffc_rddstcc, devId= 1630, deviceFaultRecord is null :true
2021-01-21 13:44:57 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[88]-[Thread-14579] 監(jiān)控設(shè)備狀態(tài)所在的項(xiàng)目 code = [xm_jffc_rddstcc] ,name = [(一路)瑞達(dá)大廈停車場(chǎng)], devId= 1631,onlineStatus = null
2021-01-21 13:44:58 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[134]-[Thread-14579] 監(jiān)控當(dāng)前設(shè)備 subsystemCode = xm_jffc_rddstcc, devId= 1631, devName = 1號(hào)門3號(hào)道進(jìn)口攝像機(jī),newStatus = 01, DeviceFaultRecord is null = true,
2021-01-21 13:44:58 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#handleNormalDevice]-[211]-[Thread-14579] handleNormalDevice 執(zhí)行,  subsystemCode= xm_jffc_rddstcc, devId= 1631, deviceFaultRecord is null :true
2021-01-21 13:44:58 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[88]-[Thread-14579] 監(jiān)控設(shè)備狀態(tài)所在的項(xiàng)目 code = [xm_jffc_rddstcc] ,name = [(一路)瑞達(dá)大廈停車場(chǎng)], devId= 1632,onlineStatus = null
2021-01-21 13:44:59 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[134]-[Thread-14579] 監(jiān)控當(dāng)前設(shè)備 subsystemCode = xm_jffc_rddstcc, devId= 1632, devName = 2號(hào)門2號(hào)道出口攝像機(jī),newStatus = 01, DeviceFaultRecord is null = true,
2021-01-21 13:44:59 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#handleNormalDevice]-[211]-[Thread-14579] handleNormalDevice 執(zhí)行,  subsystemCode= xm_jffc_rddstcc, devId= 1632, deviceFaultRecord is null :true
2021-01-21 13:44:59 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[88]-[Thread-14579] 監(jiān)控設(shè)備狀態(tài)所在的項(xiàng)目 code = [xm_jffc_rddstcc] ,name = [(一路)瑞達(dá)大廈停車場(chǎng)], devId= 1633,onlineStatus = null
2021-01-21 13:44:59 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[134]-[Thread-14579] 監(jiān)控當(dāng)前設(shè)備 subsystemCode = xm_jffc_rddstcc, devId= 1633, devName = 停車場(chǎng)服務(wù)器,newStatus = 01, DeviceFaultRecord is null = true,
2021-01-21 13:44:59 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#handleNormalDevice]-[211]-[Thread-14579] handleNormalDevice 執(zhí)行,  subsystemCode= xm_jffc_rddstcc, devId= 1633, deviceFaultRecord is null :true
2021-01-21 13:44:59 [com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl#doNomalBusiness]-[88]-[Thread-14579] 監(jiān)控設(shè)備狀態(tài)所在的項(xiàng)目 code = [xm_jffc_rddstcc] ,name = [(一路)瑞達(dá)大廈停車場(chǎng)], devId= 1634,onlineStatus = null
2021-01-21 13:45:02 [com.xxl.job.core.thread.JobThread#run]-[167]-[Thread-14579] 
----------- JobThread toStop, stopReason:阻塞處理策略-生效:Cover Early
2021-01-21 13:45:02 [com.xxl.job.core.thread.JobThread#run]-[175]-[Thread-14579] 
----------- JobThread Exception:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: interrupt
### The error may exist in URL [jar:file:/home/admin/projects/project/job-center-executor/20201221/job-jianfa-executor-1.0.0.jar!/BOOT-INF/classes!/mapper/DeviceFaultRecordMapper.xml]
### The error may involve com.jieshun.job.jianfa.executor.mapper.DeviceFaultRecordMapper.queryTopOneOfflineByTime
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: interrupt
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
	at com.sun.proxy.$Proxy68.selectOne(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	at com.sun.proxy.$Proxy87.queryTopOneOfflineByTime(Unknown Source)
	at com.jieshun.job.jianfa.executor.service.impl.DeviceStatusRecordServiceImpl.doNomalBusiness(DeviceStatusRecordServiceImpl.java:132)
	at com.jieshun.job.jianfa.executor.jobhandler.DeviceStatusRecordJobHandler.execute(DeviceStatusRecordJobHandler.java:33)
	at com.xxl.job.core.thread.JobThread.run(JobThread.java:152)

到網(wǎng)上搜了一個(gè)遍,發(fā)現(xiàn)這篇比較匹配我的問(wèn)題。

https://blog.csdn.net/qq_33366229/article/details/98479665

但是,仔細(xì)分析錯(cuò)誤日志,有幾個(gè)結(jié)論:

1、我的定時(shí)任務(wù)是 15分鐘 跑一次, 然而任務(wù)每次15分鐘都沒(méi)有跑完!所以可以判斷,這個(gè)interrupt 并非druid引發(fā),而是xxl-job 主動(dòng)干擾打斷上一個(gè)任務(wù);

2、為啥總是在 queryTopOneOfflineByTime 這個(gè)查詢報(bào)錯(cuò)呢? 仔細(xì)看時(shí)間消耗,每次 queryTopOneOfflineByTime 時(shí)間都要增加 1s,明顯此查詢很有壓力! sql 查詢慢,導(dǎo)致每次interrupt 都卡在這個(gè)查詢上。

總結(jié)上述兩點(diǎn),立即拿出解決方案:

sql 查詢,發(fā)現(xiàn)數(shù)據(jù)庫(kù)表除了主鍵索引,沒(méi)有有任務(wù)索引,于是根據(jù) queryTopOneOfflineByTime 查詢字段,相應(yīng)增加 devId 索引;

暫時(shí)先調(diào)整 定時(shí)任務(wù),改為 30 分鐘跑一次;

經(jīng)過(guò)調(diào)整, 任務(wù)不再報(bào)錯(cuò),同時(shí)任務(wù)執(zhí)行周期減少 一半時(shí)間;


請(qǐng)登錄后查看

CRMEB-慕白寒窗雪 最后編輯于2023-03-21 18:40:56

快捷回復(fù)
回復(fù)
回復(fù)
回復(fù)({{post_count}}) {{!is_user ? '我的回復(fù)' :'全部回復(fù)'}}
排序 默認(rèn)正序 回復(fù)倒序 點(diǎn)贊倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level }}

作者 管理員 企業(yè)

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推薦': '推薦'}}
{{item.is_suggest == 1? '取消推薦': '推薦'}}
沙發(fā) 板凳 地板 {{item.floor}}#
{{item.user_info.title || '暫無(wú)簡(jiǎn)介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
打賞
已打賞¥{{item.reward_price}}
{{item.like_count}}
{{item.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回復(fù) {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
打賞
已打賞¥{{itemc.reward_price}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)
查看更多
打賞
已打賞¥{{reward_price}}
4674
{{like_count}}
{{collect_count}}
添加回復(fù) ({{post_count}})

相關(guān)推薦

快速安全登錄

使用微信掃碼登錄
{{item.label}} 加精
{{item.label}} {{item.label}} 板塊推薦 常見問(wèn)題 產(chǎn)品動(dòng)態(tài) 精選推薦 首頁(yè)頭條 首頁(yè)動(dòng)態(tài) 首頁(yè)推薦
取 消 確 定
回復(fù)
回復(fù)
問(wèn)題:
問(wèn)題自動(dòng)獲取的帖子內(nèi)容,不準(zhǔn)確時(shí)需要手動(dòng)修改. [獲取答案]
答案:
提交
bug 需求 取 消 確 定
打賞金額
當(dāng)前余額:¥{{rewardUserInfo.reward_price}}
{{item.price}}元
請(qǐng)輸入 0.1-{{reward_max_price}} 范圍內(nèi)的數(shù)值
打賞成功
¥{{price}}
完成 確認(rèn)打賞

微信登錄/注冊(cè)

切換手機(jī)號(hào)登錄

{{ bind_phone ? '綁定手機(jī)' : '手機(jī)登錄'}}

{{codeText}}
切換微信登錄/注冊(cè)
暫不綁定
CRMEB客服

CRMEB咨詢熱線 咨詢熱線

400-8888-794

微信掃碼咨詢

CRMEB開源商城下載 源碼下載 CRMEB幫助文檔 幫助文檔
返回頂部 返回頂部
CRMEB客服