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

runtime: out of memory: cannot allocate #20

Open
dyaskur opened this issue Nov 12, 2021 · 1 comment
Open

runtime: out of memory: cannot allocate #20

dyaskur opened this issue Nov 12, 2021 · 1 comment

Comments

@dyaskur
Copy link

dyaskur commented Nov 12, 2021

I tried to export 1 million row of my table and return:

runtime: out of memory: cannot allocate 1073741824-byte block (1576697856 in use)
fatal error: out of memory

how to use batch or something like that to reduce memory usage?

@marchiosim
Copy link

Are you using WriteString method?
As indicated in the comment it may require a lot of memory.

https://github.com/joho/sqltocsv/blob/a6d6801d59df0193e1ec803dbd696371675a329b/sqltocsv.go#L24C1-L28C2

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

2 participants