RangeError: Maximum call stack size exceeded
I'm getting this error when I'm deploying my express typescript app that serves and API service using Apollo Graphql + uses bull MQ to connect to a redis instance. Really struggling to debug this because the logs aren't giving me much information:
/usr/src/app/node_modules/typescript/lib/typescript.js:65452
function inferFromTypes(source, target) {
^
RangeError: Maximum call stack size exceeded
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65452:30)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
at inferFromTypes (/usr/src/app/node_modules/typescript/lib/typescript.js:65459:11)
I'm using a Dockerfile for this23 Replies
Project ID:
N/A
obscene-current
Project Id: e85e85d9-84b4-4d00-bacd-3ea6ff455cc4
what do your memory metrics look like?
I have the same error,
?
any reason your app is using ~250mb of ram?
or in other words, is that normal for your app?
It's not running at all on development build
Only production
But there is 231 mb
What's weird
sounds like you have a memory leak
It's a simple nextjs application querying some data and showing in the page
yep
that will do it
For what I should look first
reading the code base and not seeing nothing wrong
im sorry but i have no clue what so ever, do some memory profiling
Found the problem, async components
awsome, that was fast
Apparently is not from async components
It's a weird issue regarding typescript itself, updated to typescript nightly release and build fine & deployed on Railway
do you use tsx to run your code? ive heard tsub is much better in terms of memory, though dont know if it would magically fix your leaky problem
Gonna say it's a default NextJS 13 project
well im out of ideas
For now running typescript on nightly release.
Not recommended, but a downgrade would cause compability errors with async components.
eh im sure its fine
These are what my metrics look like.
Running a simple typescript express backend
What is the typescript version @chainlinker ?