vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.64k stars 2.1k forks source link

vtgate equivalent of `interactive_timeout` #8002

Open adsr opened 3 years ago

adsr commented 3 years ago

Feature Description

Currently we have the mysql_server_read_timeout vtgate flag which is equivalent to mysql's wait_timeout. It would be nice to have a mysql_server_interactive_read_timeout flag for clients connecting with the CLIENT_INTERACTIVE bit set.

Use Case(s)

Useful for avoiding read timeouts on interactive sessions on vtgate:

[user@host:~] $ mysql -u... -p... -h vtgate
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 301409561
Server version: 5.7.9-Vitess Percona Server (GPL), Release 32, Revision 56bce88

Copyright (c) 2009-2020 Percona LLC and/or its affiliates
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

vtuser@vtgate [(none)]> select 1 from dual;
+-------+
| :vtg1 |
+-------+
|     1 |
+-------+
1 row in set (0.00 sec)

(Wait longer than `mysql_server_read_timeout`.)

vtuser@vtgate [(none)]> select 1 from dual;
ERROR 2013 (HY000): Lost connection to MySQL server during query
vtuser@vtgate [(none)]> 
askdba commented 3 years ago

Hi @adsr can you add the version of Vitess and MySQL this is against?

adsr commented 3 years ago

Sure, we are running Percona 5.7.29-32 and a patched version Vitess 8.0.0, although this will apply to all versions of MySQL and Vitess.