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



    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • configuration
    • None
    • docker linux into aws ECS connecting to AWS Aurora mysql cluster


      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)




            diego dupin Diego Dupin
            CyrilDevOps Cyrille Mastchenko
            0 Vote for this issue
            3 Start watching this issue



              Git Integration

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