Re: how to control DriverManager.getConnection timeout period
Posted by: Filipe Silva
Date: April 27, 2015 04:58PM

Hi Tan,

Setting the connection property socketTimeout=[milliseconds] limits the maximum time that each operation is allowed to wait on the socket.

DriverManager.setLoginTimeout([seconds]) limits the aproximate time the driver is allowed to wait for a successful authentication. Note that this feature is implemented on top of sockets timeout support.

Different operating systems with unusual network configurations may deliver different results since this features depend entirely on how sockets are implemented on the OS.

I would recommend you to try running your client application with different operating systems. If nothing helps, maybe try to implement a simple client to establish a network connection, using a default socket, to your MySQL server and explore different socket timeout settings.

If you find some bad behavior, please report it in Thanks.

Options: ReplyQuote

Written By
Re: how to control DriverManager.getConnection timeout period
April 27, 2015 04:58PM

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.