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

RejectedExecutionException sending a large amount of concurrent batches

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.1.1
    • 2.2.1, 1.7.1
    • Other
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.