Skip to content
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

A large query triggers oom, help #1990

Open
lazzyfu opened this issue Apr 1, 2019 · 7 comments
Open

A large query triggers oom, help #1990

lazzyfu opened this issue Apr 1, 2019 · 7 comments

Comments

@lazzyfu
Copy link

lazzyfu commented Apr 1, 2019

hi:
When the query returns a large amount of data, it will trigger the system's OOM。The proxysql process will be killed。
This issue exists in the following versions.

  • proxysql 1.4.15
  • proxysql 2.0.3

This should be because proxysql receives data faster than the client consumes.
I executed a query with about 20 million data volumes.

As shown below:
image

I adjusted the parameter mysql-throttle_max_bytes_per_second_to_client and it didn't work.

I read the relevant questions, but did not solve them, ask for advice, thank you

image

@lazzyfu
Copy link
Author

lazzyfu commented Apr 1, 2019

Online, thank you

@renecannao
Copy link
Contributor

Is the query using binary protocol (prepared statement) or text protocol?

@lazzyfu
Copy link
Author

lazzyfu commented Apr 1, 2019

hi.
He is a go program, should be using prepared statement,thanks.

@lazzyfu
Copy link
Author

lazzyfu commented Apr 1, 2019

I am using this package
https://github.com/jmoiron/sqlx
thanks

image

@renecannao
Copy link
Contributor

If the client is using prepared statements, currently proxysql cannot throttle traffic.
It will fetch all the resultset before sending it to the client.

I think we need to introduce a new variable to define how much data can be buffered before aborting the request.

@lazzyfu
Copy link
Author

lazzyfu commented Apr 1, 2019

I am looking forward to this parameter, thanks.
Is there an improved plan?

It should be session level

@winmutt
Copy link

winmutt commented Apr 27, 2021

Can you clarify the limitation that requires the need to return the full dataset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants