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

Implement option for "abortive" connection close via SO_LINGER option

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.1.1
    • Component/s: None
    • Labels:
      None

      Description

      When client connection are created and closed in rapid succession, depending on TCP implementation (ephemeral port range, 2MSL timeout), there might be a suituation where no socket can be created anymore, since all local ports are used used ("nestat" would show a lot of sockets in TIME_WAIT state, due to 2MSL timeout).

      This situation can be prevented if socket is closed "hard", i.e client can send RST flag on TCP packet , instead of usual longish close procedure. There is a special socket option that can be used for hard close (SO_LINGER). in Java, socket.setSoLinger(true,0) will take care of "hard" close of TCP connection.

      The task is to provide a boolean parameter tcpAbortiveClose (default false), that helps to prevent ephemeral port shortage , using setSoLinger as described above.

        Gliffy Diagrams

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                wlad Vladislav Vaintroub
                Reporter:
                wlad Vladislav Vaintroub
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 40 minutes
                  2h 40m