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

"All pipe instances are busy" exception on multiple connections to the same named pipe

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.4.6
    • 1.5.9
    • Other
    • None
    • Windows

    Description

      We configured the MariaDB server and Connector/J to attempt connections via named pipe. In parallelized unit tests, multiple threads concurrently access different databases via this named pipe. In some cases, creating a new connection fails, because the server didn't yet handle the previous connection attempt. This results in the FileNotFoundException below.

      According to the MSDN, this is a standard case and has to be handled by the client by trying the connection again after a backoff time. Such a mechanism was already implemented by another open-source JDBC driver, where a template for a Connector/J patch is readily available.

      java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=13307)(type=master) : \\.\pipe\MySQL (Alle Pipeinstanzen sind ausgelastet)
      	at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:123)
      	at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:110)
      	at java.sql.DriverManager.getConnection(Unknown Source)
      	at java.sql.DriverManager.getConnection(Unknown Source)
      	... 39 more
      Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not connect to address=(host=localhost)(port=13307)(type=master) : \\.\pipe\MySQL (Alle Pipeinstanzen sind ausgelastet)
      	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:718)
      	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:471)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:105)
      	... 42 more
      Caused by: java.io.FileNotFoundException: \\.\pipe\MySQL (Alle Pipeinstanzen sind ausgelastet)
      	at java.io.RandomAccessFile.open0(Native Method)
      	at java.io.RandomAccessFile.open(Unknown Source)
      	at java.io.RandomAccessFile.<init>(Unknown Source)
      	at java.io.RandomAccessFile.<init>(Unknown Source)
      	at org.mariadb.jdbc.internal.socket.NamedPipeSocket.connect(NamedPipeSocket.java:99)
      	at org.mariadb.jdbc.internal.socket.NamedPipeSocket.connect(NamedPipeSocket.java:83)
      	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:349)
      	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:713)
      	... 44 more
      

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              Kapone Philipp Kapfer
              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.