Closed fmuracciole closed 4 months ago
@fmuracciole Thank you for the report and repro. The Node Agent doesn't do any connection to NR in serverless mode, but the Lambda Extension does deliver telemetry and logs to NR, and is a sidecar process of the Lambda execution environment, so I'm going to raise this with the team working on the Extension.
As a short-term remediation, you could set NEW_RELIC_LAMBDA_EXTENSION_ENABLED
to false
(or enableExtension
to false
if you're using serverless-newrelic-lambda-layers
) and rely on telemetry being delivered via the log ingestion Lambda function, which operates independently from the function being instrumented.
Thanks for your reply, we'll wait for the reply of the Extension Team !
@fmuracciole
The log Task timed out after 8.01 seconds
indicates lambda task timeout is set to ~8sec in the configuration.
Please use NEW_RELIC_DATA_COLLECTION_TIMEOUT
environment variable and set it to say 4s, reference code.
Thank you!
We added timeout to http calls in the extension. When there is any issue with network call in lambda, the http calls fail fast.
In december 23' EU NewRelic servers had a severe outage, causing lambdas to timed out and reach the max concurrency limits of the AWS account. Our production applications became very slow and became down. We had to remove the newrelic layers on each lambda to resume the normal activity
Description
We are in
eu-west-1
using thearn:aws:lambda:eu-west-1:451483290750:layer:NewRelicNodeJS18XARM64:57
within a serverless configurationSteps to Reproduce
Put a hello world lambda in VPC, with a quick setup using the "serverless-newrelic-lambda-layers": "5.0.0" The Security Group of the VPC must be void of rules (inbound and outbound), the aim is to reproduce the outage of the new relic servers.
extract the serverless.yml part
the lambda code test.ts
Expected Behaviour
This code must run within 50ms from the client, 5ms from the inside lambda like this.
To have those results i 've add the outbound rule All TCP 0.0.0.0/0 on the vpc security group
Relevant Logs / Console output
When removing the outbound rule, the client get the reponse with 1.2s and the lambda continues to run until the timeout plus a 2s penalty, and fail.
Your environment
AWS, NodeJS 18.x, Typescript, layers 5.0.0, automatic wrapper
Additional context
Thanks in advance.