Reputation: 1
We are utilizing Angular 17 with SSR served by a Node.js v20 server. We serve Angular with different languages (i18n Angular), meaning we have multiple "apps" with different builds. Each app has its own Express application. The Express application determines which dist will be served. However, after some time, the Node server crashes with the following stack trace:
Caught uncaughtException RangeError: Maximum call stack size exceeded 1 with stacktrace RangeError:
Maximum call stack size exceeded
at RegExp.exec (<anonymous>)
at checkIsHttpToken (node:_http_common:213:10)
at __node_internal_ (node:_http_outgoing:621:45)
at ServerResponse.setHeader (node:_http_outgoing:654:3)
at P.writeHead (file://app/dist/app-1/server/sr-RS/chunk-BNV3IWVX.mjs:63:6091)
at ServerResponse.<anonymous> (file://app/dist/app-1/server/uk-UA/chunk-KFTLTXIP.mjs:67:2255)
at ServerResponse.<anonymous> (file://app/dist/app-1/server/uk-UA/chunk-KFTLTXIP.mjs:67:2255)
at P.writeHead (file://app/dist/app-1/server/sr-RS/chunk-BNV3IWVX.mjs:63:6223)
at ServerResponse.<anonymous> (file://app/dist/app-1/server/uk-UA/chunk-KFTLTXIP.mjs:67:2255)
at ServerResponse.<anonymous> (file://app/dist/app-1/server/uk-UA/chunk-KFTLTXIP.mjs:67:2255)
The application is based on a certain example on GitHub, found here: SSR-i18n-Angular17.
As this exception is very low level, it is really hard to debug. The logs do not say anything suspicious, except the stack trace without more information. What's also important to mention is, we have a lot of traffic, ~40k requests in 15 minutes on the node.js server. Maybe someone can help me with this issue.
See checkIsHttpToken
method:
Upvotes: 0
Views: 59