-
Notifications
You must be signed in to change notification settings - Fork 317
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
Possible memory-leak within ui-angular#AuthenticatorService (Angular SSR) #6293
Comments
Hello, @QuentinFchx and thank you for opening this issue. Greatly appreciate the sample repo and we'll investigate this/follow up with any additional questions we have. |
@QuentinFchx Hello, thanks for reaching out about this issue 👋 We suggest that the service should be used together with the Authenticator UI component. Can you clarify if you still experience this memory leak issue if you render the UI component? |
@QuentinFchx, appreciate all the detailed screenshots and context you replied with. We've been able to reproduce this consistently on our side and the memory leak seems to only happen when using SSR, but not happening when using the Authenticator component client side. As we continue to investigate the root cause here, we'll follow up if there's any workarounds we can recommend until a fix is in place. |
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
Angular
Which UI component?
Authenticator, Primitive components
How is your app built?
@angular/cli
What browsers are you seeing the problem on?
No response
Which region are you seeing the problem in?
No response
Please describe your bug.
I'm using the AmplifyUI library within a server-side rendered Angular application.
I'm seeing a constant memory increase on the machines running the server code until they crash
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
.After some quick fiddling with the Chrome memory profiler, I strongly suspect something in the amplify-related packages to trigger the issue.
Please note that I'm not very proficient with heap snapshots interpretation.
What's the expected behaviour?
No memory leak
Help us reproduce the bug!
I've created a repository that reproduces the bug https://github.com/QuentinFchx/amplify-leak
Open
chrome://inspect
Go to localhost:4000 (refresh 1-2 times to warm the server)
Take a heap snapshot
curl http://localhost:4000\?\[1-100\]
(perform 100 requests)Take another heap snapshot
-> The memory constantly increases
Please note that :
"prerender": false
AuthenticatorService
(remove the lineprivate authenticator = inject(AuthenticatorService);
)Code Snippet
No response
Console log output
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: