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

fix: Use lightweight Spanner call to address memory leak #380

Merged

Conversation

henrybell
Copy link
Collaborator

@henrybell henrybell commented Aug 29, 2024

This PR fixes a memory leak affecting the Poller component, which resulted in an increasing amount of memory consumed until the Cloud Functions instance memory limit was exceeded, and the instance was terminated. The getDatabases call returns an array of database objects -- by using a different call to the Spanner API to retrieve the number of databases for each Spanner instance, no resources are left waiting to be freed. Fixes #376.

@henrybell henrybell added the javascript Pull requests that update Javascript code label Aug 29, 2024
Copy link
Collaborator

@davidcueva davidcueva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@henrybell henrybell merged commit 5e85ecb into cloudspannerecosystem:main Aug 29, 2024
8 checks passed
@henrybell henrybell deleted the henrybell-mem-leak-fix branch August 29, 2024 15:23
@alexlo03
Copy link
Contributor

alexlo03 commented Sep 5, 2024

I have tested unreleased V3 and this solves the problem. Thanks @henrybell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Serverless Poller Memory Leak
3 participants