Hey everyone, I'm encountering a very vexing stack...
# orm-help
a
Hey everyone, I'm encountering a very vexing stack overflow on what looks like a pretty standard
createMany
call. I'm creating 20k user records with
prisma.user.createMany({data: records, skipDuplicates: true})
. Each record looks like
Copy code
{
    email:'<mailto:Dariana_Cronin@example.net|Dariana_Cronin@example.net>',
    emailVerified:true,
    firstName:'Arnoldo',
    lastName:'Brakus',
    username:'Jabari.Schmeler'
}
This call results in
Copy code
RangeError: Maximum call stack size exceeded
    at Arg.collectErrors (/mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:34906:14)
    at valueToArg (/mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:35224:47)
    at /mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:35468:17
    at Array.reduce (<anonymous>)
    at objectToArgs (/mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:35445:28)
    at /mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:34989:48
    at Array.reduce (<anonymous>)
    at selectionToFields (/mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:34948:36)
    at makeDocument (/mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:34940:20)
    at PrismaClient._executeRequest (/mnt/32DBD2DF4E5DE24C/work/projects/prisma-test/node_modules/@prisma/client/runtime/index.js:36972:23) {clientVersion: '2.29.0', stack: 'RangeError: Maximum call stack size exceeded
…les/@prisma/client/runtime/index.js:36972:23)', message: 'Maximum call stack size exceeded'}
Has anyone encountered anything like this before?
This was happening because a required field was missing in each of the 20k records I was trying to create through the
createMany
call. Unclear why this resulted in a stack overflow though...
r
@Anirudh Nimmagadda πŸ‘‹ If it works now, I would suggest creating an issue here so that we can improve the messaging πŸ™‚
a