-
Notifications
You must be signed in to change notification settings - Fork 31
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
Publishing to Lambda is extremely slow on a Windows 7 system with .NET 7 installed #314
Comments
Hello @RobotHead5000,
|
Thanks for responding. I'm going to answer the first and fourth bullets now and I'll come back to the second and third ones as I need to finish now. In answer to the first bullet: I opened the project, let it finish its faffing around, then tried to publish it to Lambda. This time I left it alone and went and had dinner. Unusually, the output in the Toolkit window didn't get as far as the 'Determining which projects to explore' line, only to:
(I thought the latest version of MSBuild was 18 but I'm not sure that matters.) Anyway, when I came back from dinner it seemed to have finished, but from the log you can see it took ~41 minutes (whereas normally it would take a few seconds). I'm afraid I haven't had time to test the function since. log_2023-01-18_19-48-41_5280.txt There do appear to be some errors in the log. The 19:50:20 line is when it finished faffing about and performance settled down after opening the solution. The lines from 19:51:52 are after I clicked the Upload button. That line has the error:
It is logged into correctly as I can see everything I'd expect to see in the AWS Explorer window, and the 'Upload to AWS Lambda' publishing wizard picked up the environment variables I've set on AWS Console for this Lambda function. Hopefully this log will give you some clues. In answer to the fourth bullet, there's only one project in the solution. As I say, I'll come back to the others, hopefully tomorrow (I've a few jobs on at the moment!). |
I've now had a chance to look at bullets 2 and 3. Bullet 2:
Bullet 3:
|
I've attached the output from this evening's attempt to publish. Interestingly, this time it got to the 'Restored ...[project]' stage immediately, but it generally behaved in the same way. There is an error in there following this stage, logged 53 minutes later.
For the last couple of things:
|
Hi @RobotHead5000, Can you check the .NET configuration of your system?
If it indicates .NET 7, can you try setting up a
Once the above setup is complete, can you try publishing your application again using the command line?
|
That fixed it! Thank you ever so much. It's interesting that it suddenly started behaving like this a month ago - I can only think to blame an automatic update that replaced .NET 6 with .NET 7. At least the global.json file should force it to behave now. Thanks again! |
Thank you for the update @RobotHead5000 , we appreciate your patience and cooperation through the investigation, and I'm glad we were able to find the cause and find a mitigation. I've updated the issue title and description to more accurately describe the problem, and will close out this issue. |
Update - This issue was a problem where .NET 7 was automatically installed into a Windows 7 system (not through the Toolkit), and the Toolkit then became very slow to publish projects to AWS Lambda.
.NET 7 is not supported on Windows 7, and the CLI command
dotnet publish
becomes slow and encounters errors. For details and mitigation, see #314 (comment)Original issue:
Describe the bug
When opening an AWS Lambda project in Visual Studio 2022 with AWS Toolkit installed and enabled, memory use increases to 99% and the system becomes unusably slow. There is also a huge amount of disk activity and CPU usage use is very high (though not 100%).
To Reproduce
Expected behavior
I expect VS to open quickly and for AWS Toolkit to package and upload the project, like it did before December.
Computer (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: