T
T
TheWWCode2022-02-09 06:55:11
Node.js
TheWWCode, 2022-02-09 06:55:11

Why isn't Mongoose passing all the data?

I am passing a large string with data in the request, format:

'string\n'string\nstring\nstring\n...'

There are about 10,000 such strings in total, but I see only 340 strings in the database after adding. How can I solve this?

let createComplete = await User.findOne({id: ctx.from.id})
await createComplete.products.push({
    strings: string
})

await createComplete.save()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philipp, 2022-02-09
@zoonman

MongoDB has a document size limit of 16MB.
Yes, and the very idea of ​​​​storing 10,000 lines inside one document smells.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question