question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`generate`: "Error: Schema parsing --- thread 'main' has overflowed its stack"

See original GitHub issue
$ prisma2 generate
(node:21024) ExperimentalWarning: The fs.promises API is experimental
Error: Schema parsing
thread 'main' has overflowed its stack
error Command failed with exit code 1.

Seems to be Windows related and related to Rust it’s stack size limit which is 1MB on Windows; (that’s what I’ve found on the interwebs)

Running it in Docker seems to fix it since that’s unix, but then when starting the project from Windows CLI it complains about not finding the windows query engine since the generate was done in unix 🤦‍♂ Happened after adding a new model to my prisma-schema, probably increased the necessary stack_size with that causing it to error.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
tomhoulecommented, Feb 5, 2020

I have a convenient way to reproduce this on my machine, working on a fix now.

1reaction
maartenraescommented, Feb 4, 2020

For people running into the same issue. You can run the project in docker and run generate command from there. To start a container from within your current working folder in powershell:

docker run -p 8080:8080  -it -v ${PWD}:/home/dev keymetrics/pm2:10-jessie /bin/bash 

or in bash

docker run -p 8080:8080  -it -v /${PWD}:/home/dev keymetrics/pm2:10-jessie /bin/bash 

This launches a bash shell inside the container, you can then run any commands that you used to run from the folder /home/dev

For example:

cd home/dev
npm run generate (-> prisma2 generate) 
npm run seed (-> ts-node prisma/seed)
npm run dev (-> cross-env NODE_ENV=development nodemon)
Read more comments on GitHub >

github_iconTop Results From Across the Web

thread 'main' has overflowed its stack in Rust
I'm trying to learn Rust (I come from Java) and I'm having some problems. I'm building a simple program that is the base...
Read more >
Thread 'main' has overflowed its stack when running an infinity ...
Why am I getting thread 'main' has overflowed its stack fatal runtime error: stack overflow fish: 'cargo run' terminated by signal SIGABRT ...
Read more >
lb genschema error stack overflow - SQLcl - Oracle Communities
And it seems it might need a deep thread stack when parsing complex SQL queries. So you might try to set -Xss to...
Read more >
What can I do to avoid "thread 'main' has overflowed its stack ...
Given this change, then main will return with an error immediately if spawning a thread returns Err(e) instead of Ok(someJoinHandle) . This is...
Read more >
The Complete Guide to the ELK Stack - Logz.io
The ELK Stack is popular because it fulfills a need in the log ... Beats 7.x conform with the new Elastic Common Schema...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found