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

MariaDbPoolDataSource's initiailzation freezes for 2 minutes with aurora

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 2.4.0
    • Fix Version/s: N/A
    • Component/s: aurora
    • Labels:
      None
    • Environment:
      AWS Java 8 Lambda
       - and -
      openjdk version "1.8.0_191"
      OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12)
      OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

      Description

      I use a MariaDbPoolDataSource connected to Aurora Mysql.

      I use the url `jdbc:mysql:aurora://my.cluster-xxxxxxxx.us-east-1.rds.amazonaws.com/dbuseLegacyDatetimeCode=false&serverTimezone=GMT`, `minPoolSize=1` and `maxPoolSize = 8`.

      In AWS Java 8 lambda sometimes the pool initialization freezes.
      I reproduce this issue on my PC using Java 11, I get the follow stack trace

      "nettyCallPool-4-1 @call-handler#3" #14 prio=10 os_prio=0 tid=0x00007f1bb8088800 nid=0x72c0 runnable [0x00007f1bdcaf8000]
      java.lang.Thread.State: RUNNABLE
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
      at java.net.SocketInputStream.read(SocketInputStream.java:171)
      at java.net.SocketInputStream.read(SocketInputStream.java:141)
      at java.io.FilterInputStream.read(FilterInputStream.java:133)
      at org.mariadb.jdbc.internal.io.input.ReadAheadBufferedStream.fillBuffer(ReadAheadBufferedStream.java:130)
      at org.mariadb.jdbc.internal.io.input.ReadAheadBufferedStream.read(ReadAheadBufferedStream.java:103)

      • locked <0x00000000dce8c1b8> (a org.mariadb.jdbc.internal.io.input.ReadAheadBufferedStream)
        at org.mariadb.jdbc.internal.io.input.StandardPacketInputStream.getPacketArray(StandardPacketInputStream.java:244)
        at org.mariadb.jdbc.internal.io.input.StandardPacketInputStream.getPacket(StandardPacketInputStream.java:215)
        at org.mariadb.jdbc.internal.com.read.ReadInitialHandShakePacket.<init>(ReadInitialHandShakePacket.java:89)
        at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.handleConnectionPhases(AbstractConnectProtocol.java:688)
        at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:412)
        at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:369)
        at org.mariadb.jdbc.internal.protocol.AuroraProtocol.loop(AuroraProtocol.java:167)
        at org.mariadb.jdbc.internal.failover.impl.AuroraListener.reconnectFailedConnection(AuroraListener.java:210)
        at org.mariadb.jdbc.internal.failover.impl.MastersSlavesListener.initializeConnection(MastersSlavesListener.java:170)
        at org.mariadb.jdbc.internal.failover.FailoverProxy.<init>(FailoverProxy.java:116)
        at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:542)
        at org.mariadb.jdbc.internal.util.pool.Pool.addConnection(Pool.java:218)
        at org.mariadb.jdbc.internal.util.pool.Pool.<init>(Pool.java:127)
        at org.mariadb.jdbc.internal.util.pool.Pools.retrievePool(Pools.java:53)
      • locked <0x00000000dc162190> (a java.util.concurrent.ConcurrentHashMap)
        at org.mariadb.jdbc.MariaDbPoolDataSource.initialize(MariaDbPoolDataSource.java:624)
      • locked <0x00000000dbfdae08> (a org.mariadb.jdbc.MariaDbPoolDataSource)

      After two minutes I get the pool working without exception.

      This behavior fits really bad in a Lambda.

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            vasco.lightstreamer Francesco Vasco
            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.