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

Un-reference intervals and timeouts #5

Merged
merged 5 commits into from
Jan 24, 2024
Merged

Un-reference intervals and timeouts #5

merged 5 commits into from
Jan 24, 2024

Conversation

pfumagalli
Copy link
Member

We observed on production that sometimes (every few or so months) when a Lambda function gets terminated because of a timeout, locks are still kept active somehow (yet unclear why).

We assume that the node process might be kept alive by the setInterval used to refresh and extend the lock, so we are now unref()-ing it to see if it alleviates the issue.

Also, we're adding a test forcedly exiting the node process to verify that the lock is automatically released.

@pfumagalli pfumagalli requested a review from esivkov January 24, 2024 15:54
@pfumagalli pfumagalli merged commit 41a877b into main Jan 24, 2024
1 check passed
@pfumagalli pfumagalli deleted the noref-interval branch January 24, 2024 16:16
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

Successfully merging this pull request may close these issues.

2 participants