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

Lambda <-> Lambda invocation taking >=3sec once in every 10/15mins #1797

Closed
Baratam opened this issue Apr 29, 2020 · 2 comments
Closed

Lambda <-> Lambda invocation taking >=3sec once in every 10/15mins #1797

Baratam opened this issue Apr 29, 2020 · 2 comments
Labels
closed-for-staleness guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@Baratam
Copy link

Baratam commented Apr 29, 2020

Describe the issue

Have 2lambdas running inside vpc, when I invoke 2nd lambda from the 1st the time taken is ==3sec , this is happening only once in every 10/15mins with or without traffic. Looks like the connection is not continuously live. i attached the log, you can observe the line 37, 40 which took 3secs to invoke lambda, initially we are using aws version 1.11.647 but as per suggestion by aws support enginneer we updated to aws sdk version to 2.13.5 , but we still see the lambda invocation is still taking 3sec EVEN AFTER UPGRADING.
**The total duration in the second lambda is around 600ms, but the invocation time between Lambda1 & Lambda2 is 3sec **

piece of log from attached: - observe the time stamp for -->Start & -->End
-->Start DmpSegments L2 invoking : 2020-04-29 17:42:13.226
2020-04-29 17:42:13.246 - DEBUG [main] com.abnamro.nl.solution.polar.application.utils.AwsLambdaInvokeUtil.invoke(AwsLambdaInvokeUtil.java:79): -->Start invoke:dmpGetLambda: 2020-04-29 17:42:13.246
2020-04-29 17:42:15.825 - DEBUG [main] com.abnamro.nl.solution.polar.application.utils.AwsLambdaInvokeUtil.invoke(AwsLambdaInvokeUtil.java:83): -->END invoke:dmpGetLambda: 2020-04-29 17:42:15.825
-->END DmpSegments L2 invoke: 2020-04-29 17:42:15.826
Attached the full log.
Attached the Aws lamdba invoke util java code

Steps to Reproduce

Create 2lambdas inside VPC & invoke from L1 <-> L2 & observe the lambda to lambda invocation time.

Current Behavior

The invocation time is taking longer than expected (3sec) where the 2nd lambda total duration is only 600ms, the expected total invocation time should be less than 1sec.

Your Environment

  • AWS Java SDK version used: software.amazon.awssdk (2.13.5)
  • JDK version used: v8
  • Operating System and version: Aws lambda service
    Attached the full log.
    Attached the Aws lamdba invoke util java code

lambdainvoke_awsv2sdk.log.zip
AwsLambdaInvokeUtil.java.zip

@Baratam Baratam added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Apr 29, 2020
@zoewangg zoewangg removed the needs-triage This issue or PR still needs to be triaged. label Apr 29, 2020
@zoewangg
Copy link
Contributor

Hi @Baratam what is the memory size of your lambda function?

You can check out this #1340 (comment) to find out the best practices to reduce SDK startup latency.

We also have a maven archetype that generates a sample lambda function with SDK best-practices incorporated. Feel free to check it out.

mvn archetype:generate \
  -DarchetypeGroupId=software.amazon.awssdk \
  -DarchetypeArtifactId=archetype-lambda \
  -DarchetypeVersion=2.13.6

@debora-ito debora-ito added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. label May 1, 2020
@github-actions
Copy link

github-actions bot commented May 7, 2020

It looks like this issue hasn’t been active in longer than a week. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.

@github-actions github-actions bot added closing-soon This issue will close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will close in 4 days unless further comments are made. labels May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

3 participants