You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by bodop <bo...@business-logics.de> on 2015/05/07 12:27:02 UTC

Timers stopped in TomEE-1.6.0.2

Hello list,

I had a severe error with TomEE-1.6.0.2 in the default configuration:

May 5, 2015 2:44:17 AM
org.apache.openejb.core.timer.DefaultTimerThreadPoolAdapter runInThread
SEVERE: Failed to execute timer task
java.util.concurrent.RejectedExecutionException: Timeout waiting for
executor slot: waited 30 seconds
    at
org.apache.openejb.util.executor.OfferRejectedExecutionHandler.rejectedExecution(OfferRejectedExecutionHandler.java:55)
    at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
    at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
    at
org.apache.openejb.core.timer.DefaultTimerThreadPoolAdapter.runInThread(DefaultTimerThreadPoolAdapter.java:151)
    at
org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:394)
May 5, 2015 2:44:17 AM org.quartz.core.QuartzSchedulerThread run
SEVERE: ThreadPool.runInThread() return false!
May 5, 2015 2:44:17 AM org.quartz.simpl.RAMJobStore triggeredJobComplete
INFO: All triggers of Job OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB set
to ERROR state.

I was not able to reproduce this. In my opinion
org.apache.openejb.core.timer.DefaultTimerThreadPoolAdapter.blockForAvailableThreads()
tries to avoid the situtation of rejected executions. But since
threadPoolExecutor.getActiveCount() only returns the aproximate number
of running threads, it may still come to rejected executions. I think
the code in TomEE-1.7.1 is very similar. As a workaround I plan to add
the following settings to system.properties:

EjbTimerPool.QueueSize 100
EjbTimerPool.OfferTimeout 10 minutes

Is there a better solution?

Best regards
Bodo





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Timers-stopped-in-TomEE-1-6-0-2-tp4674681.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Timers stopped in TomEE-1.6.0.2

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Sounds good, best with TimerService to control it is to handle it
programmatically but often it is not needed (only when queue is full which
shouldnt be the case normally). Handling concurrent @Schedule is also
important (means scheduling is wrong in general or not adapted)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-05-07 12:27 GMT+02:00 bodop <bo...@business-logics.de>:

> Hello list,
>
> I had a severe error with TomEE-1.6.0.2 in the default configuration:
>
> May 5, 2015 2:44:17 AM
> org.apache.openejb.core.timer.DefaultTimerThreadPoolAdapter runInThread
> SEVERE: Failed to execute timer task
> java.util.concurrent.RejectedExecutionException: Timeout waiting for
> executor slot: waited 30 seconds
>     at
>
> org.apache.openejb.util.executor.OfferRejectedExecutionHandler.rejectedExecution(OfferRejectedExecutionHandler.java:55)
>     at
> java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
>     at
>
> java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
>     at
>
> org.apache.openejb.core.timer.DefaultTimerThreadPoolAdapter.runInThread(DefaultTimerThreadPoolAdapter.java:151)
>     at
> org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:394)
> May 5, 2015 2:44:17 AM org.quartz.core.QuartzSchedulerThread run
> SEVERE: ThreadPool.runInThread() return false!
> May 5, 2015 2:44:17 AM org.quartz.simpl.RAMJobStore triggeredJobComplete
> INFO: All triggers of Job OPENEJB_TIMEOUT_GROUP.OPENEJB_TIMEOUT_JOB set
> to ERROR state.
>
> I was not able to reproduce this. In my opinion
>
> org.apache.openejb.core.timer.DefaultTimerThreadPoolAdapter.blockForAvailableThreads()
> tries to avoid the situtation of rejected executions. But since
> threadPoolExecutor.getActiveCount() only returns the aproximate number
> of running threads, it may still come to rejected executions. I think
> the code in TomEE-1.7.1 is very similar. As a workaround I plan to add
> the following settings to system.properties:
>
> EjbTimerPool.QueueSize 100
> EjbTimerPool.OfferTimeout 10 minutes
>
> Is there a better solution?
>
> Best regards
> Bodo
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Timers-stopped-in-TomEE-1-6-0-2-tp4674681.html
> Sent from the TomEE Users mailing list archive at Nabble.com.