JDBC响应延时,求指导

应用运行一段时间后,会出现查询数据库时数据不响应,一直在等待,等待一段时间后发现之前在等待的数据查询请求,突然一下子释放(周期性的出现类似问题),具体日志说明如下:[2014-12-29 16:05:22][nick_test]MemberService.loginProvider('huahui', '123456')
[2014-12-29 16:05:22][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('huahui', '123456')
Query in.....the time is: 1419840322243

[2014-12-29 16:05:33][nick_test]MemberService.loginProvider('test', '123456')
[2014-12-29 16:05:33][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('test', '123456')
Query in.....the time is: 1419840333498

[2014-12-29 16:05:42][nick_test]MemberService.loginProvider('test', '123456')
[2014-12-29 16:05:42][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('test', '123456')
Query in.....the time is: 1419840342627

[2014-12-29 16:05:48][nick_test]MemberService.loginProvider('test', '123456')
[2014-12-29 16:05:48][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('test', '123456')
Query in.....the time is: 1419840348726

[2014-12-29 16:06:09][nick_test]MemberService.loginProvider('nick_test', '123456')
[2014-12-29 16:06:09][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('nick_test', '123456')
Query in.....the time is: 1419840369372

[2014-12-29 16:06:33][nick_test]MemberService.loginProvider('yingxiang', '123456')
[2014-12-29 16:06:33][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('yingxiang', '123456')
Query in.....the time is: 1419840393099

[2014-12-29 16:06:33][nick_test]MemberService.loginProvider('yingxiang', '123456')
[2014-12-29 16:06:33][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('yingxiang', '123456')
Query in.....the time is: 1419840393817

[2014-12-29 16:06:38][nick_test]MemberService.loginProvider('yingxiang', '123456')
[2014-12-29 16:06:38][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('yingxiang', '123456')
Query in.....the time is: 1419840398419

[2014-12-29 16:07:10][nick_test]MemberService.loginProvider('nick_test', '12345')
[2014-12-29 16:07:10][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('nick_test', '12345')
Query in.....the time is: 1419840430371

[2014-12-29 16:08:44][nick_test]MemberService.loginProvider('nick_test', '12345')
[2014-12-29 16:08:44][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('nick_test', '12345')
Query in.....the time is: 1419840524271

[2014-12-29 16:09:11][nick_test]MemberService.loginProvider('test', '123456')
[2014-12-29 16:09:11][nick_test]ProviderBusinessRepository.queryByUsernameAndPassword('test', '123456')
Query in.....the time is: 1419840551288
^[[?1;2c^[[?1;2c^[[?1;2c^[[?1;2cQuery out.....the time is: 1419841134411---->>1419840204614 use time:929797

[2014-12-29 16:18:54]{"errno":200,"url":"../manager/public-index.htm"}
[2014-12-29 16:18:54]ALERT-[nick_test]@/member/member-login.htm@Cost 929809ms
Query out.....the time is: 1419841134511---->>1419840551288 use time:583223
[2014-12-29 16:18:54]{"errno":200,"url":"../tour/provider-index.htm"}
[2014-12-29 16:18:54]ALERT-[nick_test]@/member/member-login.htm@Cost 583225ms
Query out.....the time is: 1419841134614---->>1419840524271 use time:610343
[2014-12-29 16:18:54][test]MemberService.loginBusiness('nick_test', '12345')
[2014-12-29 16:18:54][test]ProxyBusinessRepository.queryByUsernameAndPassword('nick_test', '12345')
[2014-12-29 16:18:54][test]MemberService.login('nick_test', '12345')
[2014-12-29 16:18:54][test]MemberRepository.find('nick_test', '12345')

Query out.....the time is: 1419841134697---->>1419840430371 use time:704326
[2014-12-29 16:18:54][test]MemberService.loginBusiness('nick_test', '12345')
[2014-12-29 16:18:54][test]ProxyBusinessRepository.queryByUsernameAndPassword('nick_test', '12345')
[2014-12-29 16:18:54][test]MemberService.login('nick_test', '12345')
[2014-12-29 16:18:54][test]MemberRepository.find('nick_test', '12345')

Query out.....the time is: 1419841134786---->>1419840398419 use time:736367
[2014-12-29 16:18:54][test]MemberService.loginBusiness('yingxiang', '123456')
[2014-12-29 16:18:54][test]ProxyBusinessRepository.queryByUsernameAndPassword('yingxiang', '123456')
[2014-12-29 16:18:54][test]MemberService.login('yingxiang', '123456')
[2014-12-29 16:18:54][test]MemberRepository.find('yingxiang', '123456')

Query out.....the time is: 1419841134865---->>1419840393817 use time:741048
[2014-12-29 16:18:54][test]MemberService.loginBusiness('yingxiang', '123456')
[2014-12-29 16:18:54][test]ProxyBusinessRepository.queryByUsernameAndPassword('yingxiang', '123456')
[2014-12-29 16:18:54][test]MemberService.login('yingxiang', '123456')
[2014-12-29 16:18:54][test]MemberRepository.find('yingxiang', '123456')

Query out.....the time is: 1419841134949---->>1419840393099 use time:741850
[2014-12-29 16:18:54][test]MemberService.loginBusiness('yingxiang', '123456')
[2014-12-29 16:18:54][test]ProxyBusinessRepository.queryByUsernameAndPassword('yingxiang', '123456')
[2014-12-29 16:18:54][test]MemberService.login('yingxiang', '123456')
[2014-12-29 16:18:54][test]MemberRepository.find('yingxiang', '123456')

Query out.....the time is: 1419841135035---->>1419840369372 use time:765663
[2014-12-29 16:18:55][test]MemberService.loginBusiness('nick_test', '123456')
[2014-12-29 16:18:55][test]ProxyBusinessRepository.queryByUsernameAndPassword('nick_test', '123456')
[2014-12-29 16:18:55][test]MemberService.login('nick_test', '123456')
[2014-12-29 16:18:55][test]MemberRepository.find('nick_test', '123456')
[2014-12-29 16:18:55]{"errno":200,"url":"../manager/public-index.htm"}
[2014-12-29 16:18:55]ALERT-[nick_test]@/member/member-login.htm@Cost 765679ms
Query out.....the time is: 1419841135119---->>1419840348726 use time:786393
[2014-12-29 16:18:55]{"errno":200,"url":"../tour/provider-index.htm"}
[2014-12-29 16:18:55]ALERT-[nick_test]@/member/member-login.htm@Cost 786394ms
Query out.....the time is: 1419841135186---->>1419840342627 use time:792559
[2014-12-29 16:18:55]{"errno":200,"url":"../tour/provider-index.htm"}
[2014-12-29 16:18:55]ALERT-[nick_test]@/member/member-login.htm@Cost 792560ms
Query out.....the time is: 1419841135270---->>1419840333498 use time:801772

[2014-12-29 16:18:55]ALERT-[nick_test]@/member/member-login.htm@Cost 801773ms
Query out.....the time is: 1419841135360---->>1419840322243 use time:813117
[2014-12-29 16:18:55][test]MemberService.loginBusiness('huahui', '123456')
[2014-12-29 16:18:55][test]ProxyBusinessRepository.queryByUsernameAndPassword('huahui', '123456')
[2014-12-29 16:18:55][test]MemberService.login('huahui', '123456')
[2014-12-29 16:18:55][test]MemberRepository.find('huahui', '123456')
[2014-12-29 16:18:55]ALERT-[nick_test]@/member/member-login.htm@Cost 813131ms
Query out.....the time is: 1419841135435---->>1419840296165 use time:839270


1个回答

猜测是有未释放的锁导致,数据库有死锁的循环检测机制,一段时间后死锁被检测到并被自动释放了,挂起的连接立马就通了。

纯粹猜测,需要你自己检测一下。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐