rails-lambda / lamby

🐑🛤 Simple Rails & AWS Lambda Integration
https://lamby.cloud
MIT License
600 stars 29 forks source link

exit gracefully when SIGTERM error happens #178

Closed jeremiahlukus closed 3 months ago

jeremiahlukus commented 3 months ago

Fixes https://github.com/rails-lambda/lamby/issues/155

I also kept seeing these errors in my logs "errorMessage": "SIGTERM",

It seems like New Relic does not do anything to prevent it https://github.com/newrelic/newrelic-lambda-extension/blob/main/main.go#L42 They just catch the error. I do not think we can prevent this either but its best to catch the error.

https://github.com/aws/aws-lambda-ruby-runtime-interface-client/issues/28

jeremiahlukus commented 3 months ago

@metaskills Have a few to look at this? This would clean up my logs quick a bit since these are not "real" errors.

jeremiahlukus commented 3 months ago
Screenshot 2024-06-04 at 3 55 15 PM

deployed and working correctly

EDIT:

After having it deployed for 5 days I no longer have lambdas that take 30 sec duration which is nice.