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.

Lambda runtime prints repeated messages (and some odd ones) when it can't find the handler for the function or when an exception is thrown in the constructor

See original GitHub issue

Using dotnetcore3.1 runtime, I get the following log statements from a single Lambda invocation when I create a Lambda function that has a misconfigured Handler property in CloudFormation (meaning, the Handler refers to a class or method that doesn’t exist in the assembly).

image

The biggest problem is that Unable to load type 'LambdaSharp.Core.ProcessLogEventsFunction.Function' from assembly 'ProcessLogEvents'.: LambdaException is logged 3 times (highlighted in yellow). That means, upon querying the logs, it appears this error occurred more often than it actually did.

There are some other error messages being logged that seem to be an implementation issue of the lambda runtime and not useful to the Lambda function developer (highlighted in green).

  • 12 May 2020 21:19:02,997 [WARN] (invoke@invoke.c:297 errno: Address family not supported by protocol) run_dotnet(dotnet_path, &args) failed
  • Unknown application error occurred

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
VincentAdvocaatcommented, Sep 15, 2020

Has anyone gotten any update about this? I am also experiencing the same error: 15 Sep 2020 08:23:47,792 [WARN] (invoke@invoke.c:331 errno: Address family not supported by protocol) run_dotnet(dotnet_path, &args) failed

This happens occasionally, most of the times it works, but sometimes this error appears, it seems to be a bit random (as in, the next request which is handled by the lambda works without a problem)

1reaction
normjcommented, Feb 25, 2022

@bjorg If a Lambda compute environment fails during initialization the Lambda service retries 2 more times in case the issue was intermittent. This is a done at the Lambda service level same for all runtimes. It is not specific design decision for .NET.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Lambda function errors in C# - ...
This page describes how to view Lambda function invocation errors for the C# runtime using the Lambda console and the AWS CLI.
Read more >
AWS Lambda function errors in Java
This page describes how to view Lambda function invocation errors for the Java runtime using the Lambda console and the AWS CLI.
Read more >
Errors Outside Lambda Functions
Let's add some faulty code outside our handler function. ... This is because the Lambda runtime prints out the error message multiple times....
Read more >
Proper way to declare custom exceptions in modern Python?
What's the proper way to declare custom exception classes in modern Python? My primary goal is to follow whatever standard other exception ......
Read more >
C++ Core Guidelines
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++.
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