最近经常遇到一些程序灵异事件,比如Spring获取bean之后调用bean的方法,
然后程序在进入方法的那一刻失踪了。等了一个半小时甚至更久才进到方法里。有时候甚至完全回不来了。鬼知道它经历了什么?
今天这里也有一个问题。嗯,我在linux上部署了tomcat服务器。
然后经常在半夜的时候,我的tomcat进程大哥惨遭凶杀!等到第二天早上我来到公司,打开电脑,psg 查看我的tomcat进程,想跟它热情的说声早上好。可是悲剧的发现,
进程列表里已经没有了它的身影。我不断的寻找其死因,不断的猜测。却依旧没有找到。
凶手做的很彻底,不留痕迹。我查遍了所有能查的日志文件,没有发现任何程序大哥的呼救(也就是报错)。一直到刚刚,我发现每次它挂掉之后,我重启之前。都会有这么一行日志记录。
2017-05-23 05:35:32.174 [http-bio-8200-exec-118] DEBUG ......
# [ timer expired, abort... ]
May 23, 2017 9:20:43 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
2017-05-22 18:35:49.054 [http-bio-8200-exec-189] DEBUG ......
2017-05-22 18:35:49.064 [http-bio-8200-exec-189] DEBUG ......
# [ timer expired, abort... ]
May 22, 2017 7:45:03 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
May 22, 2017 7:45:04 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
2017-05-19 23:53:07.602 [http-bio-8200-exec-205] DEBUG .....
2017-05-19 23:53:07.649 [http-bio-8200-exec-205] DEBUG .....
# [ timer expired, abort... ]
May 22, 2017 9:39:21 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
May 22, 2017 9:39:22 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
到这里应该已经发现了吧,每次都会出现 # [ timer expired, abort... ] 这个东西。
我查了一下万能的网络,说是定时器过期???
关于定时器:
JobDetail job = newJob(AutoCountSearchFile.class).withIdentity("job1", "group1").build();
Trigger trigger = newTrigger().withIdentity("trigger1", "group1").startNow().withSchedule(dailyAtHourAndMinute(1, 0)).build();
JobDetail job2 = newJob(AutoCompleteSearch.class).withIdentity("job2", "group2").build();
Trigger trigger2 = newTrigger().withIdentity("trigger2", "group2").startNow().withSchedule(SimpleScheduleBuilder.repeatMinutelyForever(10)).build();
JobDetail job4 = newJob(AutoUpdateResume.class).withIdentity("job4", "group4").build();
Trigger trigger4 = newTrigger().withIdentity("trigger4", "group4").startNow().withSchedule(dailyAtHourAndMinute(2, 0)).build();
暂时只有这三个。请问大神,这三个定时任务对于这个问题有什么影响吗?这类定时器有什么需要注意的地方吗?