All Products
Search
Document Center

:Log on to an apsaradb for Redis instance through DMS and the system displays the "Packet for query is too large" error

Last Updated:Nov 19, 2024

Problem description

When you log on to a database with the specified username through data management service (DMS), Packet for query is too large (xxx > xxx) appears. You can change this value on the server by setting the max_allowed_packet variable." Error.

Cause

The data packet size returned by a query of the database exceeds the value of max_allowed_packet in the MySQL database. For parameters earlier than 5.6, the default value is 1 MB. For parameters later than 5.6, the default value is 4 MB. Do not use the default value.

Note

Note:

  • The default value is 1MB in earlier versions of MySQL 5.6 and 4MB in later versions of MySQL 5.6.

  • Do not use the default value.

Solution

Note

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.

  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.

  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.

In the database, run the following SQL statement to increase the value of the max_allowed_packet parameter.

set global max_allowed_packet=134217728;
Note

Note: We recommend that you set the max_allowed_packet parameter to 128MB when using DMS.

Application scope

  • Data Management

  • Tair (Redis OSS-Compatible)