socketTimeout uses double the value?
Posted by: Etienne Hardy
Date: October 02, 2025 05:43AM

Hello,

I would like to confirm a behaviour we have been observing with the MySQL Java JDBC driver. We run the latest version available, 9.4.0. Whatever value we specify for socketTimeout, the timeout will instead be after twice that time. To validate, we have implemented a piece of code that does a "select sleep(10)" query. If we set socketTimeout=1000, the query times out after 2 seconds. If we set socketTimeout=2000, the query times out after 4 seconds. We have observed this behaviour consistently. The driver documentation makes no mention of that behaviour.

Thanks in advance

Options: ReplyQuote


Subject
Written By
Posted
socketTimeout uses double the value?
October 02, 2025 05:43AM


Sorry, only registered users may post in this forum.

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.