Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

ERROR c.n.a.RetryJob - Throws java.util.concurrent.RejectedExecutionException #11

Open
yllucsmit opened this issue Jun 13, 2017 · 1 comment

Comments

@yllucsmit
Copy link

In the course of using the AsyncRetry libraries, we sometimes encounter the following:

ERROR c.n.a.RetryJob - Threw while trying to decide on retry 3 after 191

Full stack trace:
2017-06-13 00:12:41.239 EDT fap-service [pool-1877-thread-1 ] ERROR c.n.a.RetryJob - Threw while trying to decide on retry 3 after 191
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@53556437 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@3ed99da1[Shutting down, pool size = 1, active
threads = 1, queued tasks = 0, completed tasks = 2]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(Unknown Source)
at java.util.concurrent.Executors$DelegatedScheduledExecutorService.schedule(Unknown Source)
at com.nurkiewicz.asyncretry.RetryJob.retryWithDelay(RetryJob.java:92)
at com.nurkiewicz.asyncretry.RetryJob.retryOrAbort(RetryJob.java:71)
at com.nurkiewicz.asyncretry.RetryJob.handleUserThrowable(RetryJob.java:58)
at com.nurkiewicz.asyncretry.RetryJob.handleThrowable(RetryJob.java:50)
at com.nurkiewicz.asyncretry.SyncRetryJob.run(SyncRetryJob.java:26)
at com.nurkiewicz.asyncretry.RetryJob.run(RetryJob.java:108)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Running against Java version 1.8.0 on RHEL 6.9:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Not 100% sure if this is a bug, incompatibility or if I'm just using it wrong. Thanks in advance!

@pisarek
Copy link

pisarek commented Jun 28, 2017

I'm sure providing a usage scenario would help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants