tencent cloud

最終更新日:2025-07-22 16:40:54
max_allowed_packet
最終更新日: 2025-07-22 16:40:54

Feature Description

max_allowed_packet is used to set the maximum packet size allowed for SQL Engine and the client during a single data packet transmission, in bytes. When the client sends a data packet exceeding the value of max_allowed_packet, SQL Engine will reject the packet.
When adjusting the max_allowed_packet parameter, you need to consider the following factors:
System resources: Set appropriate values according to the actual resource situation of the server. When resources are sufficient, the value of max_allowed_packet can be appropriately increased to improve the system's concurrent processing capacity. In the case of resource shortage, the value of max_allowed_packet needs to be reduced to avoid resource exhaustion.
Application requirements: Set appropriate values based on the actual needs of the application. For applications with high requirements for packet size, the value of max_allowed_packet may need to be increased to meet concurrency requirements. For applications with low requirements for data packet size, the value of max_allowed_packet can be reduced to save system resources.
Database performance: Set appropriate values based on the actual performance of the database. For databases with good performance, the value of max_allowed_packet may need to be increased to improve their concurrency processing capability. For databases with poor performance, the value of max_allowed_packet needs to be reduced to avoid database overload.

Attribute Description

Attribute
Description
Parameter Type
Integer
Default Value
67108864 (namely 64 MB)
Value Range
1024 ~ 1073741824
The value of this variable should be an integer multiple of 1,024. If the value is not divisible by 1,024, a warning will be prompted and the value will be rounded down. For example, when it is set to 1,025, the actual value in TDStore is 1,024.
Applicable Scope
SESSION: In the SESSION scope, this variable is read-only.
GLOBAL
Restart Required or Not
No
この記事はお役に立ちましたか?
営業担当者に お問い合わせ いただくか チケットを提出 してサポートを求めることができます。
はい
いいえ

フィードバック