Newbie ProxySQL user - Aborted connection errors on backend

Hello, testing proxysql on dev stage, there is only 1 backend server, proxysql running on the same machine. All looks great, sysbench test works throught proxysql without errors.
But when i try to switch my web-app db connections from mysql to proxy i immediatly got tons of errors in proxysql.log and in mysql backend logs
proxysql.log:

2022-04-26 09:06:12 MySQL_Session.cpp:3930:handler_minus1_ClientLibraryError(): [ERROR] Detected a broken connection while running query on (10,12
7.0.0.1,3306,71) , FD (Conn:30 , MyDS:30) , user beauty , last_used 17667444584ms ago : 2027, received malformed packet
2022-04-26 09:06:12 MySQL_Session.cpp:3944:handler_minus1_ClientLibraryError(): [WARNING] Retrying query.
2022-04-26 09:06:12 MySQL_Session.cpp:3930:handler_minus1_ClientLibraryError(): [ERROR] Detected a broken connection while running query on (10,12
7.0.0.1,3306,72) , FD (Conn:30 , MyDS:30) , user beauty , last_used 17667444584ms ago : 2027, received malformed packet
2022-04-26 09:06:13 MySQL_Session.cpp:3930:handler_minus1_ClientLibraryError(): [ERROR] Detected a broken connection while running query on (10,12
7.0.0.1,3306,74) , FD (Conn:30 , MyDS:30) , user beauty , last_used 17667445587ms ago : 2027, received malformed packet
2022-04-26 09:06:13 MySQL_Session.cpp:3944:handler_minus1_ClientLibraryError(): [WARNING] Retrying query.

and in mysql.lod

2022-04-26 09:06:12 MySQL_Session.cpp:3930:handler_minus1_ClientLibraryError(): [ERROR] Detected a broken connection while running query on (10,12
7.0.0.1,3306,71) , FD (Conn:30 , MyDS:30) , user beauty , last_used 17667444584ms ago : 2027, received malformed packet
2022-04-26 09:06:12 MySQL_Session.cpp:3944:handler_minus1_ClientLibraryError(): [WARNING] Retrying query.
2022-04-26 09:06:12 MySQL_Session.cpp:3930:handler_minus1_ClientLibraryError(): [ERROR] Detected a broken connection while running query on (10,12
7.0.0.1,3306,72) , FD (Conn:30 , MyDS:30) , user beauty , last_used 17667444584ms ago : 2027, received malformed packet
2022-04-26 09:06:13 MySQL_Session.cpp:3930:handler_minus1_ClientLibraryError(): [ERROR] Detected a broken connection while running query on (10,12
7.0.0.1,3306,74) , FD (Conn:30 , MyDS:30) , user beauty , last_used 17667445587ms ago : 2027, received malformed packet
2022-04-26 09:06:13 MySQL_Session.cpp:3944:handler_minus1_ClientLibraryError(): [WARNING] Retrying query.

The first and last suggestion was about max_allowed_packet size, but it’s seems ok, 32Mb on mysql and 16Mb in runtime_global_variables in proxyslq.
Found some issues with wait_timeout, but it’s 60 seconds on mysql, and errors appears immediatly after i start web applications.
Any ideas? Thanks

Can’t tell what version of MySQL you are running. Can’t tell what version of ProxySQL either. You said you tested sysbench from localhost. Did you test sysbench from remote host? Can you create manual connections from remote host through proxysql?

1 Like

Oh, my bad
ProxySQL version 2.3.2-percona-1.1, codename Truls
Percona-server-server-5.7 5.7.37-40-1.buster

My web application runs on the same server, so i don’t test remote connections yet. It seems, that part of requests from web applications walks throuth proxy normal, and i can see it in query log. But others not. And seems, that there is no place i can found that problem requests.

1 Like

60s wait_timeout on MySQL is pretty low. Can you try reverting that to the default and see if your issue remains?

1 Like

Yes, i tired set default 28800 seconds in mysql and in proxy server, but results are the same. And as i understand it’s can’t be timeouts, coz errors appears immediatly i change database connection in application, after 3-5 seconds.
And again - i can see some normal requests in queries.log, so connection, user settings and so on are normal. May be this is some “unnormal” sql-request, but how can i track them…

1 Like