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

memory leak #18

Closed
philkunz opened this issue Jul 28, 2022 · 5 comments
Closed

memory leak #18

philkunz opened this issue Jul 28, 2022 · 5 comments

Comments

@philkunz
Copy link

Monitoring revealed that there seems to be a memory leak somewhere in here. Have you monitored your services over longer periods of time?

@depyronick
Copy link
Owner

hi @philkunz,

where do you experience the issue? on clickhouse, or the nodejs application that you're using the client with?

@philkunz
Copy link
Author

node.js. -> I have a grafana dashboard showing me memory usage and cpu usage of our services. After integrating this package I noticed a steady increase in both CPU and Memory usage. I looked into the source code and noticed you are using brotli. There are other issues on Github (like here Alorel/shrink-ray#49) where Brotli is potentially responsible for memory leaks.

@philkunz
Copy link
Author

I reimplemented the http client quickly, and the service is not showing any memory leaks with that:
https://gitlab.com/pushrocks/smartclickhouse/-/blob/master/ts/smartclickhouse.classes.httpclient.ts

@depyronick
Copy link
Owner

depyronick commented Jul 28, 2022

Have you tried explicitly setting the compression option to ClickHouseCompressionMethod.GZIP to see if it makes any change?

depyronick referenced this issue Oct 6, 2022
- add support for several types.
- `query` return type is now `string | T`.
- `queryPromise` return type is now `string | T[]`.
- queries will return `T` for `JSON` formats and `string` for others.
- do not allow queries with unsupported formats.
- better handling of promise to avoid redundant memory fills
- separate http configuration and clickhouse settings
@depyronick
Copy link
Owner

Please try 2.0.0 and reopen the issue if still occurs.

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