java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@1a779c1 rejected from java.util.concurrent.ThreadPoolExecutor@a27a60[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 6]

DataStax JIRA | Ngoc Minh | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Hello, We got an issue when preparing statements under high activity. When number of threads limit is reached on the server, SessionManager.toPreparedStatement() hangs with RejectedExecutionException in Futures.transform() method. Here is the callstack with driver v2.0.8: {code} java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@1a779c1 rejected from java.util.concurrent.ThreadPoolExecutor@a27a60[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 6] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2013) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:816) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1337) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170) at com.google.common.util.concurrent.Futures.transform(Futures.java:606) at com.google.common.util.concurrent.Futures.transform(Futures.java:715) at com.datastax.driver.core.SessionManager.toPreparedStatement(SessionManager.java:159) at com.datastax.driver.core.SessionManager.prepareAsync(SessionManager.java:124) at com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:77) at com.bnpparibas.eqd.atlas.core.CassandraDatabase.prepare(CassandraDatabase.java:178) at com.bnpparibas.eqd.atlas.core.persistence.GenericDao.buildUpdateQuery(GenericDao.java:117) at com.bnpparibas.eqd.atlas.storage.titan.persistence.pdlidentity.PdlIdentityDao.createQueries(PdlIdentityDao.java:42) at com.bnpparibas.eqd.atlas.core.CassandraDatabase.registerDao(CassandraDatabase.java:94) at com.bnpparibas.eqd.atlas.core.persistence.GenericDao.<init>(GenericDao.java:38) {code} I've found an interesting article on the issue: http://www.concurrentaffair.org/2012/10/27/problems-with-rejectedexecutionhandler-and-futures/ Could you please investigate? Thanks in advance for your help. Minh

    DataStax JIRA | 2 years ago | Ngoc Minh
    java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@1a779c1 rejected from java.util.concurrent.ThreadPoolExecutor@a27a60[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 6]
  2. 0

    Hello, We got an issue when preparing statements under high activity. When number of threads limit is reached on the server, SessionManager.toPreparedStatement() hangs with RejectedExecutionException in Futures.transform() method. Here is the callstack with driver v2.0.8: {code} java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@1a779c1 rejected from java.util.concurrent.ThreadPoolExecutor@a27a60[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 6] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2013) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:816) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1337) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170) at com.google.common.util.concurrent.Futures.transform(Futures.java:606) at com.google.common.util.concurrent.Futures.transform(Futures.java:715) at com.datastax.driver.core.SessionManager.toPreparedStatement(SessionManager.java:159) at com.datastax.driver.core.SessionManager.prepareAsync(SessionManager.java:124) at com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:77) at com.bnpparibas.eqd.atlas.core.CassandraDatabase.prepare(CassandraDatabase.java:178) at com.bnpparibas.eqd.atlas.core.persistence.GenericDao.buildUpdateQuery(GenericDao.java:117) at com.bnpparibas.eqd.atlas.storage.titan.persistence.pdlidentity.PdlIdentityDao.createQueries(PdlIdentityDao.java:42) at com.bnpparibas.eqd.atlas.core.CassandraDatabase.registerDao(CassandraDatabase.java:94) at com.bnpparibas.eqd.atlas.core.persistence.GenericDao.<init>(GenericDao.java:38) {code} I've found an interesting article on the issue: http://www.concurrentaffair.org/2012/10/27/problems-with-rejectedexecutionhandler-and-futures/ Could you please investigate? Thanks in advance for your help. Minh

    DataStax JIRA | 2 years ago | Ngoc Minh
    java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@1a779c1 rejected from java.util.concurrent.ThreadPoolExecutor@a27a60[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 6]
  3. 0

    How do I clean up Cassandra resources without having memory leaks?

    Stack Overflow | 3 years ago | Kartik
    java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@7c435ce7 rejected from java.util.concurrent.ThreadPoolExecutor@96203d77[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    mapper.save() throws a ThreadPool error (Java)

    Google Groups | 5 months ago | Ali Akhtar
    java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@5164e29 rejected from java.util.concurrent.ThreadPoolExecutor@53213dad[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
  6. 0

    Leftover callbacks on execution context shutdown

    Google Groups | 4 years ago | Som Snytt
    java.util.concurrent.RejectedExecutionException: Task scala.concurrent.impl.CallbackRunnable@f1bb79c rejected from java.util.concurrent.ThreadPoolExecutor@64b36a83[Shutting down, pool size = 2, active threads = 2, queued tasks = 0, completed tasks = 0]
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.concurrent.RejectedExecutionException

    Task com.google.common.util.concurrent.Futures$ChainingListenableFuture@1a779c1 rejected from java.util.concurrent.ThreadPoolExecutor@a27a60[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 6]

    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution()
  2. Java RT
    ThreadPoolExecutor.execute
    1. java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2013)
    2. java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:816)
    3. java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1337)
    3 frames
  3. Guava
    Futures.transform
    1. com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484)
    2. com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
    3. com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101)
    4. com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)
    5. com.google.common.util.concurrent.Futures.transform(Futures.java:606)
    6. com.google.common.util.concurrent.Futures.transform(Futures.java:715)
    6 frames
  4. DataStax Java Driver for Apache Cassandra - Core
    AbstractSession.prepare
    1. com.datastax.driver.core.SessionManager.toPreparedStatement(SessionManager.java:159)
    2. com.datastax.driver.core.SessionManager.prepareAsync(SessionManager.java:124)
    3. com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:77)
    3 frames
  5. com.bnpparibas.eqd
    GenericDao.<init>
    1. com.bnpparibas.eqd.atlas.core.CassandraDatabase.prepare(CassandraDatabase.java:178)
    2. com.bnpparibas.eqd.atlas.core.persistence.GenericDao.buildUpdateQuery(GenericDao.java:117)
    3. com.bnpparibas.eqd.atlas.storage.titan.persistence.pdlidentity.PdlIdentityDao.createQueries(PdlIdentityDao.java:42)
    4. com.bnpparibas.eqd.atlas.core.CassandraDatabase.registerDao(CassandraDatabase.java:94)
    5. com.bnpparibas.eqd.atlas.core.persistence.GenericDao.<init>(GenericDao.java:38)
    5 frames