MySQL exception packet for query is too large (14040 > 1024)

Source: Internet
Author: User

When you use Sqoop to export data from hive to MySQL, you encounter an exception that is caused by the small max_allowed_packet settings of the exported database.
By executing the command in the database:

mysql> show variables like ‘max_%packet‘;+--------------------+-----------+| Variable_name      | Value     |+--------------------+-----------+| max_allowed_packet | 268435456 |+--------------------+-----------+
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6


The above is the value after the change, but most of the internet is said to modify the MY.CNF, the value is directly added to the mysqld below, set to 20M above the value can be, but previously used in the configuration is very high, through observation found query_cache_ Limit value is 1M try to change this value after you find Max_allowed_packet this value also changed.

Max_allowed_packet parameters
This parameter is the size of the received packet, which takes a smaller value to catch the exception of the packet and prevents memory overflow due to the packet being too large.

Query_cache_limit parameters
This parameter specifies the size of a single query cache, should not be too large, if the data more than the case should be appropriate to increase the parameter value, but the general small data size of the query does not need to set too large otherwise causing memory fragmentation.

MySQL exception packet for query is too large (14040 > 1024)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.