1

I am using Django with RDS along with Aptible deployement. I started receiving lots (2027, 'Malformed packet') for a while but when I run the same query using Django "shell" OR "dbshell" then the query works fine.

I am not able to find any lead around that, found some articles/answers but now one could help.

SHIVAM JINDAL
  • 2,844
  • 1
  • 17
  • 34

1 Answers1

2

Try by disabling query-caching on MySQL if it works. There is a bug reported in MySQL with MySQL-client and MySQL-server versions reported here. Usually, Malformed Packet error occurs when the MySQL client can't understand the packets sent by the MySQL server.

In our case, we were hitting the same MySQL Server (DB) from two different client machines with different versions of the MySQL client. So, with query-caching enabled, whenever we were running the same query with both of the client machines, we were getting this error.

Both of these solutions worked for us:-

  1. Disabling the query-caching.
  2. By installing the same MySQL-client version on both of the client machines (now it worked with query-caching enabled as well).