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

Handle SIGTERM #834

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Handle SIGTERM #834

merged 1 commit into from
Feb 5, 2025

Conversation

fkorotkov
Copy link
Contributor

There is an OOM happening on Cloud Run but we don't capture anything in Sentry. I believe it's because Cloud Run sends us SIGTERM and we don't handle it.

There is an OOM happening on Cloud Run but we don't capture anything in Sentry. I believe it's because [Cloud Run sends us `SIGTERM`](https://cloud.google.com/run/docs/container-contract#instance-shutdown) and we don't handle it.
@fkorotkov fkorotkov requested a review from edigaryev February 5, 2025 14:15
@@ -67,7 +68,7 @@ func main() {
ctx, cancel := context.WithCancel(context.Background())

interruptCh := make(chan os.Signal, 1)
signal.Notify(interruptCh, os.Interrupt)
signal.Notify(interruptCh, syscall.SIGINT, syscall.SIGTERM)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched to syscall for both for consistency

@fkorotkov fkorotkov merged commit 9d85601 into master Feb 5, 2025
11 checks passed
@fkorotkov fkorotkov deleted the handle-sigterm branch February 5, 2025 16:26
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