Possible memory-leak within ui-angular#AuthenticatorService (Angular SSR) #6293
Labels
Angular
An issue or a feature-request for Angular platform
Authenticator
An issue or a feature-request for an Authenticator UI Component
pending-triage
Issue is pending triage
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: