Bug #114453 | MySQL Connector/J never participates in the TCP connection terminations | ||
---|---|---|---|
Submitted: | 22 Mar 13:53 | Modified: | 8 Jun 1:38 |
Reporter: | Jean-christophe Manciot | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 8.3.0 | OS: | Ubuntu (23.04 lunar) |
Assigned to: | MySQL Verification Team | CPU Architecture: | x86 |
Tags: | MYSQl 8.0.35 |
[22 Mar 13:53]
Jean-christophe Manciot
[22 Mar 14:00]
Jean-christophe Manciot
The last steps '4. Click on...' and '5. Notice the...' must be replaced by '9. Click on...' and '10. Notice the...' respectively.
[22 Mar 14:02]
MySQL Verification Team
Hi Mr. Manciot, Thank you for your bug report. Please, check all your other system variables, like : connect-timeout interactive-timeout net-read-timeout net-write-timeout port-open-timeout ssl-session-cache-timeout We are waiting on your feedback.
[28 Mar 14:56]
Jean-christophe Manciot
Sorry for the delay, but despite being subscribed to email updates, I received none after your comment. Anyway, here is the answer: +-----------------------------------+----------+ | Variable_name | Value | +-----------------------------------+----------+ | connect_timeout | 600 | | interactive_timeout | 28800 | | net_read_timeout | 600 | | net_write_timeout | 600 | | ssl_session_cache_timeout | 300 | +-----------------------------------+----------+ And there is no such thing defined as a system variable named 'port_open_timeout'. 'port-open-timeout' has not been used either to start the server AFAIK.
[28 Mar 16:10]
MySQL Verification Team
Hi Jean Christophe, Have you tried to disable automatic reconnection ?????
[29 Mar 11:54]
Jean-christophe Manciot
I'm not sure what you mean by "disabling automatic reconnection". From 3.6.8 Automatic Reconnection Control of MySQL 8.0 C API Developer Guide, Auto-reconnect is disabled by default and I did not actively tried to enable it. Anyway, I don't know how to make sure it is actually disabled. I tried another lead taken from 'Troubleshooting Connector/J Applications' (https://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-troubleshooting.html#qanda...): "Ensure connections are valid when used from the connection pool. Use a query that starts with /* ping */ to execute a lightweight ping instead of full query. Note, the syntax of the ping needs to be exactly as specified here." So I set quarkus.datasource.jdbc.validation-query-sql with /* ping */ instead of SELECT 1 - all 'com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure' are still there - all MySQL server FIN/ACK and RESETs also
[3 Apr 8:55]
Jean-christophe Manciot
Hi MySQL Verification Team, Have you followed the steps outlined in the first post to reproduce this issue?
[8 May 1:38]
Filipe Silva
Hi Jean-christophe, Do you have samples of the MySQL error log and Java stack traces for the occurrences? If I understand correctly your suggested fix, this is not possible in MySQL Connector/J. The driver does not reconnect automatically broken connections, not even when setting `autoReconnect=true`, which always returns an Exception between re-connects. This is so by design so that application know that something wrong is happening. And mind that `autoReconnect=true` is not recommended. It is the responsibility of connection pool managers to keep connections alive and re-create new ones when needed. Typically a connection handed over by a connection pool manager is verified to work fine so if something happens afterwards it must be because of network issues or because a server crash or connection shutdown due to some special condition. Applications are required to return connections to the pool as soon as possible to avoid other issues. From your description I can't understand if this error occurs all the time or a few times after having the system operating normally. It seems to me that you have other connectivity or setup issues and there's nothing we can do in the server or connector to avoid them. Since you are already checking network traffic, I'd suggest disabling connection encryption and see what kind of packets are being exchanged here. It could help identifying the exact point the the data flow the issues are arising. Please check your configurations carefully and provide any additional information that could help us help you.
[9 Jun 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".