Skip to content

Fix misuse of max_allowed_packet #431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2016

Conversation

methane
Copy link
Member

@methane methane commented Feb 23, 2016

fixes #426, #407 and #397

@WorldException
Copy link
Contributor

May bee my changes with get max_allowed_packet when connect help for fix it?
Soume code as this in connection.py connect()
self.max_allowed_packet = min(16kb, get_server_variable('max_allowed_packet')

Only used to limit size of "LOAD LOCAL INFILE" data packet smaller than default (16KB).

methane added a commit that referenced this pull request Feb 23, 2016
@methane methane merged commit 2622e52 into PyMySQL:master Feb 23, 2016
@methane methane deleted the fix/load-local-chunk-size branch February 23, 2016 22:36
@methane
Copy link
Member Author

methane commented Feb 23, 2016

@WorldException No. "Using packet as large as possible" is not good solution.

max_allowed_packet may be very large (say 100MB or 1GB).
Too large packet decrease performance and increase memory usage unnecessary.

16KB is small enough for memory and disk readahead, and large enough to avoid
too small TCP packet.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when trying to execute "LOAD DATA LOCAL INFILE" using Python Processes
2 participants