-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrations - RangeError: Maximum call stack size exceeded #1725
Comments
I was actually just informed by someone else of a similar looking issue and I have been scratching my head as to what might be causing it... Can you confirm the version of node you're seeing the issue in? |
Thanks for the quick reply! I'm seeing the issue on Node 6.7. More than happy to test on other versions if you'd like. |
Yeah, since that's the latest would you mind checking if it shows up on the last few versions prior? Thanks! |
I should have tested on another version before; my apologies. That said, I did some testing and can confirm it starts acting up in Node 6.5 and is present in 6.6 and 6.7. Node 6.4 and below seem to work fine. |
Hm, we actually encountered these errors as well, it was in one of our tests where we had to migrate back and forth. I'll try to find a commit/issue and supply potentially resourceful information if possible. |
Not sure if this is what Tim was referring to, but we had a similar bug on node v6 only in our custom migration system with regard to the It would take 6/7 goes through travis to get the our tests to pass. Meaning the problem is also intermittent. Very, very, very odd. |
@ErisDS do you know which version of node? |
I'm guessing this is an example failure case, where it seems it's failing in node 6.7 - https://travis-ci.org/TryGhost/Ghost/jobs/164642712 The fact that this has just started happening recently makes me think it's potentially an issue related to the v8 bump in node >= 6.5 |
Yeah that is one example, we see this fail in different ways. Another example is this (copied and pasted before a restart): https://gist.github.com/ErisDS/a63a989d7c46dfa487a3f8819729bb66 It was all within the last few days, so v6.7 I am collecting failures in gists and posting them here: TryGhost/Ghost#7470, only the last few show the proper error messages, because we refactored our error handling and now the errors bubble up properly 😁 |
@ErisDS Sounds like what we experienced, but as db latency got higher the problem occurred more predictably. |
@tgriesser I'll try to find time to test this (if I can reproduce this predictably) on node v7 (v8 5.5). |
I split out the offending code paths so this hopefully shouldn't happen. Also opened a ticket on nodejs about it (and mentioned all of you) if you'd be able to provide any other info that might be helpful. If it is a v8 regression its a bit concerning even if we patched it here. @jamesdixon Any chance you could npm install from master and see if things are fixed? |
@tgriesser I can confirm this appears to be resolved in 0.12.5. Thanks a ton for looking into this and providing a fix! |
I'm running into a very strange error when running Knex migrations.
For context, I'm speaking specifically about running migrations during testing. Before each test, my database is completely wiped and migrations are run. I use the following script:
This has been working perfectly for months. Yesterday, I added a new field to one of my tables and suddenly I started receiving the following error:
You'll notice that right after the repeating piece ends, the stack trace points to one of my migrations. Here's the thing, the name of that file changes on every run and whenever I look at those files, there's nothing wrong.
Here's a strange thing: when running my tests, this doesn't seem to occur right away. A few tests are run before failure. When I take a look at the
migrations
table after the failure, the number of records is never consistent, so it doesn't seem that a specific migration is causing the issue.Here's the really strange thing: if I remove a single field from ANY one of my 42 migrations, everything works completely fine. If I add a field back to any one of those migrations, regardless of name or type, I see the error again.
It's almost like I've hit some sort of field limit or there is some sort of leak. I'm running v0.12.2, but have tried versions of 0.11.x and 0.10.0 and see the same issue.
I'd post my files if I could, but there's just too many.
Appreciate any help -- this is a doozy.
Thanks!
The text was updated successfully, but these errors were encountered: