tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: EJB timers stop working.
Date Wed, 11 Feb 2015 17:56:14 GMT
Here the log I'd check: "Timer" (note: not sure it is on by default I
didnt check its default config in tomee)

Some additional checks: with jstack check threads "EjbTimerPool*"

Also check your config of the timer pool (here some basic
conf/system.properties properties for default setup):

EjbTimerPool.CorePoolSize=10
EjbTimerPool.RejectedExecutionHandlerClass=no default for it so it
uses next property
EjbTimerPool.OfferTimeout = 30 seconds


My guess is either these threads are stucked somewhere and we need to
know (can just be a standard queueing issue due to overload) or they
are rejecting tasks but this should be logged AFAIK



Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-11 17:29 GMT+01:00 jieryn <jieryn@gmail.com>:
> I've seen this in production for quite a while, too, on Apache TomEE 1.7.1.
>
> I've never been able to catch a log message which showed it, we end up
> having to restart periodically in order to ensure the timers are
> reactivated. I suspect this is a user error, but .. no log messages.
> It's not easy to detect when something isn't running..
>
> Is there some class name I can grep my logs for that would help?
> Whatever the class that runs the @Scheduled @Singleton @Stateless
> @Startup beans.
>
> On Wed, Feb 11, 2015 at 9:48 AM, Matej <gmatej@gmail.com> wrote:
>> Hi all.
>>
>> In production under load, we experienced a case were a particular timer
>> stopped working.
>>
>> I thought maybe a runstime exception stops a ScheduleExpression, but could
>> not simulate this. Glassfish I know was very sensible to this.
>>
>> Could a low EJB timer thread seeting cause a timer to stop, working.
>>
>> We use tomee 1.7
>>
>> The timer is initialized like that.
>>
>> @Singleton
>> @Lock(LockType.READ)
>> @Startup
>> public class CommEtaUpdateCacheTimer {
>>
>>     @Inject
>>     private TimerScheduler scheduler;
>>
>>     @PostConstruct
>>     public void doit() {
>>         final ScheduleExpression schedule = new ScheduleExpression()
>>                 .hour("*")
>>                 .minute("*")
>>                 .second("*/5");
>>
>>         scheduler.scheduleEvent(schedule, new
>> CommEtaUpdateCacheTimerEvent());
>>     }
>>
>>     public void observe(@Observes CommEtaUpdateCacheTimerEvent event) {
>> /*
>> processing code.
>> */
>>
>>     }
>>
>>     public static class CommEtaUpdateCacheTimerEvent {
>>     }
>> }
>>
>> BR
>>
>> Matej

Mime
View raw message