max_allowed_packet

2024-12-02 03:48:29  Updated

Note

This variable was introduced in OceanBase Database V3.2.3.

Description

max_allowed_packet specifies the maximum size of a network packet.

Attributes

Attribute Description
Type Integer
Default value 16777216, in bytes

Note

The default value has been changed from 4194304 to 16777216 since OceanBase Database V4.2.1.

Value range [1024, 1073741824]
Effective scope
  • Global
  • Session
Modifiable Yes. You can use the SET GLOBAL statement to modify the variable.

Considerations

  • You can use the SET GLOBAL statement to modify the global value of the variable. However, you cannot use the SET SESSION statement to modify a session value of the variable.
  • You can only view the session value. The session value must be the same as the global value.
  • This variable must be modified on both the client and the OBServer node. If the values on the client and the OBServer node are inconsistent, the following error is returned: ERROR 1153 (08S01): Got a packet bigger than \'max_allowed_packet\' bytes".

Example

obclient> SET GLOBAL max_allowed_packet=4194304;

References

Set the length of the RANDSTR function

Contact Us