Comments (3)
Hi @goober
thanks for bringing this up and also providing a repo with code to reproduce this. I haven't had the time to look into it, but two things that come into my mind.
-
In the beginning of writing this driver I have encountered a similar behaviour and thought, that there is a memory leak. It has turned out, that Go is very greedy about memory and the GC only releases it once he has to as other resources are requesting the memory. This could take some time. Have you tried to close the DB connection and wait for some time afterwards (while the program is still running) and observe the memory usage? Maybe the memory will be freed after some period of time.
-
Have you tried to run your queries using the Python DuckDB driver and compared it to go-duckdb? Maybe this is not a memory leak on the Go/CGO side but more in the DuckDB or Parquet part?
Once I have more time, I'll dig deeper into it.
from go-duckdb.
I have updated the repo with a second application based on Python that should process the parquet file in the same way as the golang application. Even though it does not release all memory that I would have expected, it releases something as you can see in the image:
I have also let the golang application run for a while to see if any memory is released, but unfortunately it keeps the memory at the same level.
I saw that another issue, that could be related, has been opened against the duckdb repository recently but in their case it was a NodeJs based application. I add it here for reference as well. duckdb/duckdb#6607
from go-duckdb.
@marcboeker I have found some memory leaks when the result is being processed in chunks. See linked PR #83 for a fix.
from go-duckdb.
Related Issues (20)
- Cannot pass schema and search_path as a DSN query param HOT 4
- Cannot create tables with Primary Key (silent fail) HOT 1
- How to manually commit the contents of the WAL file to the main database file before db closed? HOT 8
- [email protected]\appender.go:451:11: invalid array length 1 << 31 (untyped int constant 2147483648) HOT 2
- "unsupported type 17" on duckdb > 0.10.0 HOT 2
- Uncaught exception of type duckdb::InternalException HOT 1
- Add CI script to run gofumpt
- hope create a new tag for last update HOT 1
- Build failures on redhat linux HOT 1
- Support missing timestamp types in the appender HOT 1
- Detect incorrect column counts in the appender
- transaction.go:6:5: undefined: conn HOT 9
- Exposing filesystem interface HOT 1
- Make Apache Arrow Optional HOT 2
- Add support for the DATE type in the appender
- Does `go-duckdb` has a glibc version dependency? HOT 2
- Silent primary key violation in the appender HOT 2
- Appending a NULL in UUID[] column panics HOT 1
- found architecture 'arm64', required architecture 'x86_64' on mac os HOT 3
- libduckdb.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-duckdb.