question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Experimental-serverless-trace target increases Lambda@Edge SSR page cold boot times

See original GitHub issue

Issue Summary

The use of experimental-serverless-trace target with SSR page doubles lambda cold boot times. This causes application performance downgrade on lambda cold starts serving that page.

Actual behaviour

Boot times are roughly doubled with experimental-serverless-trace compared to serverless target.

Expected behaviour

Boot times are roughly same with experimental-serverless-trace compared to serverless target.

Steps to reproduce

Set useServerlessTraceTarget: true in serveless.yml for application with SSR.

Versions

Additional context

N/A

Checklist

  • [x ] You have reviewed the README and FAQs, which answers several common questions.
  • [ x] You have reviewed our DEBUGGING wiki and have tried your best to include complete information and reproduction steps (including your configuration) as is possible.
  • [ x] You have first tried using the most recent latest or alpha @sls-next/serverless-component release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the old serverless-next.js component and the serverless-next.js plugin are deprecated and no longer maintained.

Screenshots/Code/Configuration/Logs

lambda-edege-cold-start-with-trace-target

lambda-edege-cold-start-without-serverless-target

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
khg0712commented, Feb 10, 2022

Any updates here?

0reactions
ari-luokkalacommented, Nov 19, 2021

We have used CloudFront monitoring and from there Lambda@Edge metrics. Additionally for debugging we some times fork this repo and deploy custom version with added custom debug logging. We have also set “logLambdaExecutionTimes: true” in serverless.yml, but I haven not noticed any impact with that. In the lambda logs, I think there is also this “initial time” or similar showing the cold boot times.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing and debugging Lambda@Edge functions
This topic includes sections that describe strategies for testing and debugging Lambda@Edge functions. It's important to test your Lambda@Edge function code ...
Read more >
Serverless Next.js Component - Serverless Framework: Plugins
Pages that need server side compute to render are hosted on Lambda@Edge. ... false, Use the experimental-serverless-trace target to build your next app....
Read more >
Untitled
With SSR the TTFB can be increased due to the time spent on the server evaluating HTML and populating the page with data...
Read more >
For the Love of Serverless - New Relic
js and Python for building serverless applications on Lambda, with Java as the third most-used runtime. However, with the AWS launch of ...
Read more >
How can I improve serverless function (lambda) cold start ...
When a lambda function starts for the first time, it's a cold start. Subsequent requests to that function are then considered warm. Cold...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found