socketTimeout uses double the value?
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
Subject
Written By
Posted
socketTimeout uses double the value?
October 02, 2025 05:43AM
February 10, 2026 02:23PM
February 19, 2026 06:08AM
February 22, 2026 01:44PM
February 23, 2026 06:45AM
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.