FEDERATED engine not handling wait_timeout MySQL Bug #33500956
Description
Environment
is duplicated by
relates to
Activity

Yura Sorokin May 22, 2023 at 1:08 PM

Till Wimmer May 16, 2023 at 4:19 PM
@Kamil Holubicki Thank you for your effort!
I think it's something did didn't occur with the temporary fix. Maybe that helps your for a conclusion...

Kamil Holubicki May 16, 2023 at 11:46 AM
Thank you for details.
I was able to reproduce it on Debian 10. Then also reproduced on Ubuntu Jammy, but with a longer sequence length (20000).
My initial investigation shows that internal reconnection works fine however, some errors related to internal proxy -> server connection leak to the client's session.

Till Wimmer May 9, 2023 at 6:40 PM
Do you mean connecting to server_2 and executing these queries directly on it? In such a case federated storage engine has nothing to do (as it is present only on server_1 and acts as a proxy for server_2)
Yes sorry I mean the server which uses the FEDERATED tables of course, so it's server 1 in your example.
Maybe this is an issue with the network configuration? For my tests both servers are VMs on the same host. But on our productive servers one is a real hardware (with FEDERATED) and the other is a virtual instance and the issues seam similar.
VM 1:
Debian 10.13
Kernel Linux xxxx-mig 4.19.0-24-amd64 #1 SMP Debian 4.19.282-1 (2023-04-29) x86_64 GNU/Linux
mysql Ver 8.0.32-24 for Linux on x86_64 (Percona Server (GPL), Release '24', Revision 'e5c6e9d2')
/etc/mysql/mysql.conf.d/mysqld.cnf:
VM 2:
Only difference:
I start to get the feeling that this has something to do with some Debian 10 specific dependencies...
Not sure how to get AMI images. We host our own servers on VirtualBox. Are there still free AWS accounts?

Kamil Holubicki May 9, 2023 at 11:12 AMEdited
> On your setup from above try on the federated DB of server 2:
Do you mean connecting to server_2 and executing these queries directly on it? In such a case federated storage engine has nothing to do (as it is present only on server_1 and acts as a proxy for server_2)
Here are my results:
Executed on server_2:
so it works as expected. Client is disconnected because of inactivity, error message is displayed, client is automatically reconnected.
Executed on server_1:
So again, works as expected.
Could you check and provide me with:
If both servers in your env have 8.0.32 version?
Versions of mysql client on both servers
full servers configuration
Operating system (ideally AMI image of OS where you are able to reproduce the issue)
Details
Details
Assignee
Reporter

Regression Issue
Upstream Bug URL
Needs Review
Needs QA
Fix versions
Affects versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

For a table using the FEDERATED storage engine, if consecutive queries on the local server have a delay between them that exceeded the remote server’s wait timeout (
wait_timeout
setting), a packet error is returned on the local server.This was reported with https://jira.percona.com/browse/PS-7999 and solved but then again reverted with https://github.com/percona/percona-server/commit/8a44ea641c5410452e199a0aba46a805c05f60e3
But upstream fix was not applied.