MySQL Forums
Forum List  »  Connector/JDBC and Java

Re: Pooled connection closing sockets
Posted by: Mark Matthews
Date: December 08, 2016 01:06PM

Hi,

The driver is using whatever your platform default for SO_LINGER is when calling .close() (via the code in the java.net implementation of Socket). Currently this value is not configurable via the JDBC driver. I'm assuming SO_LINGER is what is keeping your socket open for some time after calling .close(), because calling PooledConnection's .close() turns around and immediately calls .close() on the physical JDBC connection which then calls .close() on the socket.

I suppose you could either configure their TCP/IP stack to use lower values for SO_LINGER globally, or submit a patch to plumb through the setting of SO_LINGER in the JDBC driver *or* submit a feature request for the same?

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Pooled connection closing sockets
December 08, 2016 01:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.