-
Notifications
You must be signed in to change notification settings - Fork 132
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
Upgraded Nuget now web app hangs #253
Comments
If we remove the AWS Log4net Section from the web.config everything works as expected minus the logs getting shipped to AWS Cloudwatch. |
@ethos-tim Good morning. Thanks for reporting the issue. Could you please share the below:
Thanks, |
Potential duplicate of 1968? @ashishdhingra - to answer some of your questions that I'm aware of, the issue occurs in an EC2 instance, which is managed by us, and our application runs within IIS on an application pool which does NOT load the user profile. The EC2 instance has attached to it an EC2 IAM role which affords the permissions required by the logger (we use the same role to perform other things like S3 operations, etc. so the SDK should be able to access the creds through metadata). I have validated that the APIPA address and URL resolves the correct credentials at: http://169.254.169.254/latest/meta-data/security-credentials/our-ec2-iam-role When the issue is occurring, the application doesn't send anything to the front end. The initial get request to the application remains in a pending state indefinitely. In the server, the web.config remains locked by the w3p.exe process and is unable to be modified. Thank you for the resource to enable verbose logging, I would like to configure that to determine what's actually going wrong. |
Note: this was all working and logging fine before the nuget update. |
It also happens in local development with IISExpress. It worked before the nuget update without any AWS setup or credentials on the developer a machine. We updated the nuget and it all locks up. From my understanding log4net is supposed to fail gracefully and not BLOCK if something is configured wrong. |
All the proper permissions were configured and working with the previous version of the nuget. I verified them using the simulator in AWS yesterday. My guess is that something changed around how it located the credentials? |
For a sample app you can see this: aws/aws-sdk-net#1968 (comment) |
Update: I tested in a SEPARATE environment which did NOT have the required IAM permissions, after adding LibraryLogFileName to the appender, I observed the expected log generated from the library stating that I was missing required permissions. I then gave the correct IAM permissions and restarted the app and its pool (this requires directly killing the process for the app after stopping the pool), observing that the issue of the application locking still occurs, but now there is no logging of any error locally. So, I can't determine exactly what is going wrong because neither the SDK nor the DotNet logger is logging anything about its own failure (obviously no events are logged to the log stream either). |
@ers-jporche Thanks for your analysis. We would need to investigate what is going wrong. I will discuss this with the team. |
I did some more troubleshooting with the SDK source and Logger source. It looks like the issue is in the SDK, See here: aws/aws-sdk-net#1968 (comment) This is where it locks up in the Logger but that only appears to be due to the SDK hanging: \aws-logging-dotnet\src\AWS.Logger.Core\Core\AWSLoggerCore.cs Line 101 |
I think the issue is with the SDK and this ticket can be merged to the SDK ticket. See latest there: aws/aws-sdk-net#1968 (comment) |
Discussed this issue and other one aws/aws-sdk-net#1968 with the team. The investigation would be done as part of aws/aws-sdk-net#1968. @ethos-tim Thanks for reporting your findings on aws/aws-sdk-net#1968. |
We've released AWS.Logger.Core v3.3.3 today, which now lazily initializes the internal CloudWatch Logs client. This should avoid the race condition with the SDK's own logging that was leading to the deadlock. You could either upgrade your pinned version of AWS.Logger.Core, or to AWS.Logger.Log4net v3.5.3 to pull in the latest core. Let us know if that doesn't mitigate the issue for you, thanks. |
Comments on closed issues are hard for our team to see. |
Describe the bug
Everything was working for our developers and in our QA site. We upgraded nuget and if the developer did not have the AWS CLI configured the app hung at startup during ASP.NET initialization. We fixed that by configuring the AWS CLI for those users. We then installed it in QA where it was all working and logging perfectly before we upgraded the packages. The app now hangs and will never start. This all worked fine with the previous versions. Doing a dump of the w3wp.exe shows it locked and hung at:
Old Packages:
New Packages:
Is there a new config setting we need to set?
Expected Behavior
It runs and if it can not start it fails and just does NOT log. And it works like it used to work with the exact same settings and configuration.
Current Behavior
It hangs the entire web application and prevent it from starting.
Reproduction Steps
Update from previous version of nuget for ASP.NET Web applications and watch it all break.
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Targeted .NET Platform
.NET Framework 4.8
Operating System and version
Windows 10, 11 and Server 2016
The text was updated successfully, but these errors were encountered: