Title: [platform-server] SSR for Standalone Component: bootstrapApplication have memory leaks · Issue #46473 · angular/angular · GitHub
Open Graph Title: [platform-server] SSR for Standalone Component: bootstrapApplication have memory leaks · Issue #46473 · angular/angular
X Title: [platform-server] SSR for Standalone Component: bootstrapApplication have memory leaks · Issue #46473 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? No Description ngModule version I clone the Angular Universal repo version from angular: checkout master then: pnpm install pnpm dev:ssr to serv...
Open Graph Description: Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? No Description ngModule version I clone the Angular Universal repo version from angular: checkout master...
X Description: Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? No Description ngModule version I clone the Angular Universal repo version from angular: checkout master...
Opengraph URL: https://github.com/angular/angular/issues/46473
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[platform-server] SSR for Standalone Component: bootstrapApplication have memory leaks ","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\nplatform-server\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\n# ngModule version\r\nI clone the Angular Universal repo version from angular:\r\n\r\n- checkout master then: `pnpm install`\r\n- `pnpm dev:ssr` to serve\r\n- `nodemon --inspect=localhost:9236 dist/server/main.js` to inspect\r\n\r\nThen I start it and make a heap snapshot. it's fine.\r\nOpen dev tools for Node.js to inspect, Go to memory tab, search `module` keyword\r\n\r\n\r\nfirst-time load home page:\r\n\r\nload home page at second time:\r\n\r\n\r\nload home page at 20th times:\r\n\r\n\r\neverything is fine and no leak. NgModule only have 2 instance\r\n\r\n# Standalone version\r\n\r\nI upgrade the universal version of the standalone component, I'm going to make this on the universal repo, but first, it has a memory leak.\r\n\r\n- checkout master then: `pnpm install`\r\n- `pnpm dev:ssr` to serve\r\n- `nodemon --inspect=localhost:9236 dist/server/main.js` to inspect\r\n\r\ngo home page and f5 for 6 times:\r\n\r\n\r\ngo home page and f5 for more 5 times:\r\n\r\n\r\nwe get too many modules that are not clear and the heap memory goes \"To infinity and beyond\".\r\nThe ApplicationModule goes to x6 on 6 load pages, and x11 if you have 11 load pages.\r\n\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://github.com/hiepxanh/universal-test\r\n\r\n### Please provide the exception or error you saw\r\n\r\n_No response_\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```true\r\nAngular CLI: 14.0.2\r\nNode: 16.13.1\r\nPackage Manager: pnpm 7.1.5\r\nOS: win32 x64\r\n\r\nAngular: 14.0.3\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, platform-server\r\n... router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1400.2\r\n@angular-devkit/build-angular 14.0.2\r\n@angular-devkit/core 14.0.2\r\n@angular-devkit/schematics 14.0.2\r\n@angular/cli 14.0.2\r\n@nguniversal/builders 14.0.1\r\n@nguniversal/common 14.0.1\r\n@nguniversal/express-engine 14.0.1\r\n@schematics/angular 14.0.2\r\nrxjs 7.5.5\r\ntypescript 4.7.4\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\nI'm running the standalone SSR version in my production version. Current work around is restart the server :D","author":{"url":"https://github.com/hiepxanh","@type":"Person","name":"hiepxanh"},"datePublished":"2022-06-23T10:05:02Z","url":"https://github.com/angular/angular/issues/46473"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:360272d0-474d-3189-314f-17dbe43fced5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABDE:3D8CBB:1404255:1A6579F:6B0120D5 |
| html-safe-nonce | c6d93257bd20b7899ff15475a8b221964c834fc5f1e9549cfbdacea2dd3d56aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkRFOjNEOENCQjoxNDA0MjU1OjFBNjU3OUY6NkIwMTIwRDUiLCJ2aXNpdG9yX2lkIjoiMjA0NjkwNzM5NTYwMjQ1Njc4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 149ab1f5a4d78f92bba73fc8213b0f9860c6ae70b242788ff9d701394f3cbcf7 |
| hovercard-subject-tag | issue:1282153094 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/46473/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c4a948761168863d9251fd130aa5bfc07c36115e29416a5e0d2a3afb7cb3bf5c/angular/angular/issues/46473 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c4a948761168863d9251fd130aa5bfc07c36115e29416a5e0d2a3afb7cb3bf5c/angular/angular/issues/46473 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? No Description ngModule version I clone the Angular Universal repo version from angular: checkout master... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hiepxanh |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width