-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[blazor-wasm] Improve handling OOM error, and surface it better #95971
Comments
@radical this seems like a good improvement. Do you have any concrete suggestion on the error message, etc? |
Thanks for contacting us. We're moving this issue to the |
@radical can you please clarify what your suggestion here is? |
I'm suggesting that we should catch this
And fix dotnet/aspnetcore#40547 . All this would then avoid cryptic errors for which the solutions ends up being - change --
|
I am cross posting this as it may be helpful from dotnet/aspnetcore#40547 "Hello, I put in an issue similar and closed it since this one seems to be the one where everything is tracked regarding this. This to me seems huge and would make my clients rethink any investment in Blazor. Is there any way this could be looked into for an earlier release than next nov? --Edit below |
Also would setting |
if you are using .NET 6 use EmccTotalMemory (it will continue to work), the rename is around clarity. |
What happens if I choose 16gb and someone on an phone doesn't have 16gb of memory? What are the error cases with this? |
WASM is 32-bit right now so anything above 4gb definitely won't work, and in some cases 2gb is your hard limit, FYI. |
ok that is good to know, I just don't want to apply this change/fix to my production system and then be crashing peoples devices |
there is still a soft limit where your device or browser may not be able to allocate the requested amount of memory, and that soft limit is likely lower than 2gb on constrained devices like mobile handsets. in some cases instead of failing to allocate the memory the browser tab will go away because the mobile approach to memory management is to randomly kill processes when memory is low. |
Ah I wish it was killing it when the error I mentioned further up happens. That would be a bit better than a forever spinner. |
Thanks for contacting us. We're moving this issue to the |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsExample issue: dotnet/aspnetcore#40528 If the initial heap size is too big (set via
We should instead catch the OOM error, and maybe surface it as better error that the app can catch, and surface to the user. And log a useful error message on how to fix it, for the the app developer.
|
We could translate that error to something which would be easier to understand for the developer. We don't fallback in instantiation anymore. We do it in the compilation |
Error message was added by #104963 |
Example issue: dotnet/aspnetcore#40528
If the initial heap size is too big (set via
$(EmccTotalMemory)
) then the user sees:We should instead catch the OOM error, and maybe surface it as better error that the app can catch, and surface to the user. And log a useful error message on how to fix it, for the the app developer.
And with dotnet/aspnetcore#40547 , it won't make an unnecessary second attempt.
@kg @lewing @pranavkm
The text was updated successfully, but these errors were encountered: