[CONJ-27] Implement option for "abortive" connection close via SO_LINGER option Created: 2013-02-28  Updated: 2013-07-04  Resolved: 2013-02-28

Status: Closed
Project: MariaDB Connector/J
Component/s: None
Affects Version/s: 1.1.0
Fix Version/s: 1.1.1

Type: Task Priority: Minor
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to CONJ-52 Document tcpAbortiveClose parameter Closed

 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.


Generated at Thu Feb 08 03:12:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.