I'm experiencing a strange mysql behaviour that occurs between two virtual machines.

When I have a query string longer than 1457 chars, the connection I'm using hangs.
I was thinking the problem was a query with a tons of result but then discovered that the query string is not important.

For example:

select * from users where uname = "abcdefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffpooooooooooppppppppfooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooffffffseroieeeeuuwwwwwwwwwwwuii";

hangs the server.

If i remove a single char from that string, mysql returns an empty recordset, as expected. There is not a such user and the field uname is varchar(64). The table, contains just one record.

I tried to monitor the socket and discovered that the querystring is retransmitted 20 times and then the traffic stops but the client does not exit and connection is not dropped/closed.cd ->

The very same query made from a different instance to the same server, works flawlessy. I tried the official mysql terminal client, an alternative terminal client and a script but I got the same result.

  • File a bug report with a concrete example at bugs.mysql.com
    – Rick James
    Commented Mar 3, 2022 at 20:21
  • This could be an issue with MTU setting on the network interfaces on the host. Might be that the query ends up in a too long TCP segment, which is then dropped by the kernel. Commented Mar 5, 2022 at 11:32
  • Thanks for the suggestion @RickJames. It is difficult to file a bug report. The problem is limited to a single server vm when it interacts with a specific vm client. I replicated the two vms and the problem gone away. I Rebooted the two original vms and the problem persists. If just one of the two machines change, the problem will not occurs.
    – Eineki
    Commented Mar 5, 2022 at 23:27
  • @Eineki - Thanks for trying. "client" -- mysql commandline client? Or something else?
    – Rick James
    Commented Mar 6, 2022 at 1:46
  • Yes, @RickJames mysql command line client, mycli, an alternative commandline client written in python and a very simple php script (connect, send the query, retrieve the empty recordset and close connection) written on purpose. Same result. I'm starting to think of the mtu as #TeroKilkanen pointed out (the string lenght should have set that bell ringing).
    – Eineki
    Commented Mar 7, 2022 at 13:22


You must log in to answer this question.

Browse other questions tagged .