WFLYEJB0043: A previous execution of timer [timer] is still in progress, skipping this overlapping scheduled execution at [time]
Asked Answered
K

2

8

I have defined some persistent timers in a singleton EJB as follows (using WildFly 9.0.2 final).

@Startup
@Singleton
@Lock(LockType.READ)
public class BackgroundJobManager implements BackgroundJobService {

    @Schedule(dayOfMonth = "1", month = "Jan", year = "*", hour = "0", minute = "0", second = "0", persistent = true)
    private void doYearlyJob() {
        //...
    }

    @Schedule(hour = "*", minute = "*/5", second = "0", persistent = true)
    private void updateTopSellers() {
        //...
    }

    @Schedule(hour = "*", minute = "*/1", second = "0", persistent = true)
    private void updateFeedback() {
        //...
    }

    //...
}

Several warnings are issued on server startup and when the application is redeployed like the following (these are merely a few of them).

19:46:51,687 WARN  [org.jboss.as.ejb3] (EJB default - 3) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:25:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,796 WARN  [org.jboss.as.ejb3] (EJB default - 4) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 22:50:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,890 WARN  [org.jboss.as.ejb3] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:26:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,953 WARN  [org.jboss.as.ejb3] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 22:55:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:51,984 WARN  [org.jboss.as.ejb3] (EJB default - 7) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:27:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:51 IST 2015.
19:46:52,062 WARN  [org.jboss.as.ejb3] (EJB default - 8) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:00:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,218 WARN  [org.jboss.as.ejb3] (EJB default - 9) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:28:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,328 WARN  [org.jboss.as.ejb3] (EJB default - 10) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:05:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,390 WARN  [org.jboss.as.ejb3] (EJB default - 3) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:29:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,453 WARN  [org.jboss.as.ejb3] (EJB default - 4) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:10:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,484 WARN  [org.jboss.as.ejb3] (EJB default - 5) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:30:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,531 WARN  [org.jboss.as.ejb3] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:15:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,593 WARN  [org.jboss.as.ejb3] (EJB default - 7) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:31:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,687 WARN  [org.jboss.as.ejb3] (EJB default - 8) WFLYEJB0043: A previous execution of timer [id=fc285ef2-c7a1-4a2e-af57-d320c769b445 timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 23:20:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.
19:46:52,781 WARN  [org.jboss.as.ejb3] (EJB default - 9) WFLYEJB0043: A previous execution of timer [id=15baaed1-d804-48fc-acdb-80ea3e04735f timedObjectId=WildFly.WildFly-ejb.BackgroundJobManager auto-timer?:true persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@9e86f initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Fri Dec 11 16:32:00 IST 2015 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Sat Dec 12 19:46:52 IST 2015.

Timer service is defined in standalone-full-ha.xml as follows.

<timer-service thread-pool-name="default" default-data-store="clustered-store">
    <data-stores>
        <database-data-store name="clustered-store" datasource-jndi-name="java:jboss/datasources/projectXADatasource" database="mysql" partition="timer"/>
    </data-stores>
</timer-service>

These warnings also appear, when these timers are persisted to the file system in place of a database, no matter whether the application is deployed in a cluster (standalone-full-ha.xml) or non-cluster (standalone-full.xml) environment.

I regularly flush out all contents of standalone/data (except the deployed JDBC driver and custom contents), standalone/deployments and standalone/tmp whenever necessary. Symptoms of timers are no longer available in standalone/data as they were before, when timers were initially being persisted to the file system.

Is there a fix?


There is a question but I am not satisfied with the answer given (sorry). Besides, that question uses JBoss EAP 6.4 and why the tag presents there while using EJBs in an application server is a mystery to me.


Update :

The issue remains stationary in WildFly 10.0.0 final.

Kobold answered 12/12, 2015 at 14:41 Comment(13)
Persistent timers and development (hotdeploy/hotpublish) don't always go together very well. Theoretically, the IDE's server plugin is to blame.Emit
NetBeans WildFly plugin indeed does not work as they claim. Turning to another IDE is a learning curve and is not possible immediately as I am completely accustomed to using NetBeans, since the beginning of time. I only wonder how other people afford to use WildFly with NetBeans in this way.Kobold
Eclipse is also far from Perfect ;)Emit
If the plugin is not working as expected feel free to file a bug :) netbeans.org/bugzilla/enter_bug.cgi?product=serverplugins. As far as I know there's one guy working on the plugin in his spare time. He's usually quite responsive though.Montherlant
@JamesR.Perkins : The path to Bugzilla initiates from here and here and finally reaches to the Bugzilla tracker. I reported about a year ago but its status was "RESOLVED INCOMPLETE". Not all bugs can be expressed linguistically without having a face to face conversation involving a practical approach.Kobold
Since you can 'talk' to me on wildfly hipchat channel or wildfly/netbeans irc channels this can be resolved this way.Veliger
@Veliger : I can easily sacrifice everything else except "Deploy on Save" for now which I can reproduce on a blank playground Java EE project having only a single Java source file or JSP / XHTML file avoiding all technical details in the project. I do not see the application being deployed when some changes to the application are saved. To be crystal clear, the "Deploy on Save" option on the IDE is turned on. The only thing which I do not use is Apache Maven to build and deploy Java EE applications. They are built and deployed using Apache Ant built in the IDE itself.Kobold
the "Deploy On Save" on Netbeans works this way : the IDE give me a list of files to update and I copy them in the exploded directory in the deployments folder. Then WildFly should redeploy it. Could you check that the files are updated ? I usually use wildfly examples to test but maybe they are a little too light. If you have some example application I would happily try it.Veliger
@Veliger : I never heard of copying some files somewhere for the deployment process to occur :) While using GlassFish or Apache Tomcat, the application automatically starts deploying, if one or more Java source files are modified and saved (Ctrl + Shift + S). This does not happen while using WildFly. Sample applications I use to test this contain nothing (plain empty) other than a single Java source file having no overhead of extra libraries. The application can only be deployed by "Right clicking on the application -> Clean & Build and then Deploy" which is time consuming.Kobold
Hum which version ( WildFly, netbeans and plugin) do you use, this is a call from the IDE to the plugin giving it the changes. I've seen it work numerous times with JSP and ServletsVeliger
@Veliger : NetBeans 8.1 / WildFly 9.0.2 final. (I did not change the plugin shipped with the IDE).Kobold
Hi, is the bug fixed in WildFly 10?Muncy
@Muncy : I dunno.Kobold
R
6

This is an acknowledged bug. See https://issues.jboss.org/browse/WFLY-6561.

The bug has also been applied to JBoss 7 as well: https://issues.jboss.org/browse/JBEAP-4442

Roughcast answered 2/5, 2016 at 15:52 Comment(1)
Thanks for the referenceJaysonjaywalk
A
1

We were getting this "warning" on startup which seems to execute the scheduledTimeout method successfully anyway. There's not really an error here especially since the persistent attribute on the @Schedule annotation defaults to true. This message appears for us (in development) during startup after the server has been down for a sustained period of time (therefore missing the timeout events that would have occurred had the server been online). Other answers to this question are also probably valid, but noting this here if the proper function of this feature is being overlooked.

Basically, if you're thinking this is a problem, re-evaluate whether you want your @Schedule timed event to replay all events missed while the server was offline. If not, then set the persistent attribute to false in the annotation.

Augustaugusta answered 13/12, 2017 at 20:57 Comment(2)
i have the same problema and turning persistent to false does not solve the problemAnimal
@Ewerton, very interesting. What would JBoss be in the middle of executing if it didn't persist your timer during the last shutdown?Augustaugusta

© 2022 - 2024 — McMap. All rights reserved.