Skip to content

[Bug]: write rawlog with db_holder.go got Error packet for query is too large. #12489

Closed

Description

@xzxiong

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): main 7ca9a35
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

log file:
ETLMerge.h1000.log

  • error info
{"level":"ERROR","time":"2023/11/02 03:35:13.399531 +0800","name":"log-service.ETLMerge","caller":"export/merge.go:393","msg":"failed to upload file to MO","uuid":"7c4dccb4-4d3c-41f8-b482-5251dc7a41bf","table":"system.rawlog","path":"sys/logs/2023/11/02/rawlog/1698866704_7c4dccb4-4d3c-41f8-b482-5251dc7a41bf_ALL_130285749.csv","error":"packet for query is too large. Try adjusting the `Config.MaxAllowedPacket`","span":{"trace_id":"f69a6344-c06e-fa5c-6fd8-603899698bee","span_id":"e6033f01f6063e17"}}

file size: 20MiB

image

suggestion:

  • set the max_allowed_packet = 30MiB in db connet DSN

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    on Nov 2, 2023
  2. added this to the 1.1.0 milestone on Nov 2, 2023
  3. gavinyue commented on Nov 11, 2023

    @gavinyue
    Contributor

    maxAllowedPacket=0
    在建立链接的时候已经设置了 maxAllowedPacket 为unlimited.
    遇到这种情况只能是server端没有honor这个协议。

  4. gavinyue commented on Nov 11, 2023

    @gavinyue
    Contributor

    只能想想办法再load里 分拆了

  5. gavinyue commented on Nov 11, 2023

    @gavinyue
    Contributor
  6. gavinyue commented on Nov 11, 2023

    @gavinyue
    Contributor

    这个是因为MO 的server side default max_allowed_packet是16mb.

    client端怎么设置, 都会以server端为准, 所以需要再server修改。

    我提了一个PR来提高server side defautl setting to 64mb

    但是这个问题也可以通过在server端修改配置来解决。

  7. xzxiong commented on Nov 13, 2023

    @xzxiong
    ContributorAuthor

    @gavinyue 现在只能通过修改默认值,解决么?
    这个参数本身就应该是 session的 variable;另外,也应该支持在go SDK中DSN中指定。

  8. gavinyue commented on Nov 13, 2023

    @gavinyue
    Contributor

    不是,这个pr只是让Mo的默认值和现在MySQL 的默认值已经gosql client的默认值保持一致。

    可以在server 端修改这个值,但是需要功过跑一个sql.

    另外client端的设定本来默认就是64mb, 但是client端的设置是不影响server的设置的, 最终以server端的设置为准。

  9. xzxiong commented on Nov 28, 2023

    @xzxiong
    ContributorAuthor

    checked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions