Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-553

RejectedExecutionException sending a large amount of concurrent batches

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.2.1, 1.7.1
    • Component/s: Other
    • Labels:
      None

      Description

      RejectedExecutionException is thrown in high load environments, while issuing batch operations.

      java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@3f924f3d rejected from java.util.concurrent.ThreadPoolExecutor@7a90c6ab[Running, pool size = 100, active threads = 99, queued tasks = 0, completed tasks = 52]
      	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
      	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
      	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
      	at org.mariadb.jdbc.internal.protocol.AbstractMultiSend.executeBatchStandard(AbstractMultiSend.java:237)
      	at org.mariadb.jdbc.internal.protocol.AbstractMultiSend.executeBatch(AbstractMultiSend.java:189)
      	at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeBatch(AbstractQueryProtocol.java:669)
      	at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeBatchStmt(AbstractQueryProtocol.java:586)
      	at org.mariadb.jdbc.MariaDbStatement.internalBatchExecution(MariaDbStatement.java:1283)
      	at org.mariadb.jdbc.MariaDbStatement.executeBatch(MariaDbStatement.java:1235)
      	at ClientStandalone.executeUpdate(ClientStandalone.java:35)
      	at ClientStandalone.execute(ClientStandalone.java:55)
      	at ClientStandalone.access$0(ClientStandalone.java:49)
      	at ClientStandalone$1.run(ClientStandalone.java:80)
      	at java.lang.Thread.run(Thread.java:745)
      

      We think that changing the executor rejection policy in class org.mariadb.jdbc.internal.util.scheduler.SchedulerServiceProviderHolder, the problem would be solved.

      Attached example and patch.

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            mariallou María
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration