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

allow setup of TCP_KEEPIDLE, TCP_KEEPCOUNT, TCP_KEEPINTERVAL in the jdbc url

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: configuration
    • Labels:
      None
    • Environment:
      docker linux into aws ECS connecting to AWS Aurora mysql cluster

      Description

      Hi, we use liquibase and mariadb jconnector to update our schema in Aurora Mysql.
      We found that the 'cluster' address of Aurora is hiding a NAT that kill connection after 5mn if there is no data.
      Some of our schema change (alter table ...) take more than 5mn, so the alter table run in aurora but liquibase/mariadb see a connection lost after 5mn.

      One easy solution is to generate tcp keepalive packet, I was able to make it work on my laptop running the docker image with privileges and using sysctl to change the linux tcp keepalive interval to less than 5mn.

      Sadly in our ECS cluster, we don't have privileges to change the linux tcp keepalive interval (it is a host base settings).

      Linux allow you to setup per connection the value, they are part of the ExtendedSocketOptions in recent java version.
      It would be nice to be able to setup those values the same way we enable tcpkeepalive in the jdbc url.
      That would allow our liquibase container and our main java application to be able to run query/schema change that take more than 5mn without getting disconnected.

      AWS Aurora mysql doesn't seems to allow settings on the server side.
      The default linux 2hours tcp keepalive is far too long here.

      (those value can also be setup at low value automatically when we use jdbc:mariadb:aurora url prefix)

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            CyrilDevOps Cyrille Mastchenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration