Skip to content

fix(metrics): use clearInterval instead of clearTimeout in stop() #246

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
Apr 8, 2025

Conversation

isawalhi
Copy link
Contributor

@isawalhi isawalhi commented Apr 7, 2025

About the changes

When using unleash-proxy-client on the server side (e.g., for SSR or per-request flag fetching), we observed increasing memory usage and event loop handles even though .stop() was called immediately after .start().

After investigation, the issue was resolved by setting disableMetrics: true, suggesting that .stop () does not properly clean up background metrics collection.

Closes #245

@github-project-automation github-project-automation bot moved this from New to Approved PRs in Issues and PRs Apr 8, 2025
@ivarconr ivarconr requested a review from FredrikOseberg April 8, 2025 07:35
@FredrikOseberg FredrikOseberg merged commit 6d57a98 into Unleash:main Apr 8, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from Approved PRs to Done in Issues and PRs Apr 8, 2025
@lo1tuma
Copy link

lo1tuma commented Apr 11, 2025

I still have this issue in the latest version 3.7.5

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

Successfully merging this pull request may close these issues.

Memory Leak When Using UnleashClient per Request — .stop() Does Not Fully Clean Up
4 participants