Migration to mongo atlas causing me problems

later migration to mongo atlas I can’t persist in the migrated collection (1.6b of documents) through the application, but I can persist in the same database in a new collection, I’m using mongoose as ODM and doing a bulk operator.
these are my connection options in mongo:

{
  useNewUrlParser: true,
  useUnifiedTopology: true,
  retryWrites: true,
  writeConcern:{w:"majority",wtimeout:2500}
}

Hi @Adailson_Moreira and welcome in the MongoDB Community :muscle: !

Your connection options look fine to me. Apart from that, you are not providing enough information so we can help you :confused: .

If you are migrating from on prem to Atlas, I would use the live migration tool that is available in Atlas. Especially if you have large volumes.

Cheers,
Maxime.

Thank you very much for the reception, the migration has already been done according to the link you informed me, the point is that now I am not able to persist in this migrated collection. I did some tests with the same code and I can persist with another collection that I created without the same amount of data and the same indexes and it worked normally… in this case of not being able to persist, no error is returned.

below is the process done via code: gist:99b9a35fa72a556e31053a6f49aa158e · GitHub, remembering that the bulk Model B and what is the mongo atlas the bulk model A and another database.

Are you sure the Atlas user has read & write access to any database? It’s not normal that you don’t get an error message. Something must be wrong in your code.
Is your IP address correctly in the IP access list?

Yes it is, I even get successful connection with mongo but when it runs the bulk it crashes…

What’s the error message then?

the error does not occur and the callback is simply waiting to be resolved and this never occurs

Something’s wrong in your code. Try to isolate the problem. I can’t tell what’s wrong just from this piece of code. :confused:

to be a code error I would not be able to persist in another collection created in the same atlas and in the same database with the same code.

There is one thing I do not see in your code.

How do you initialize the variables bulkMesssageReport and bulkMessageMigration?

Note the 3 sss in bulkMesssageReport exactly like you have in the code you shared.

find out what the problem was, the lack of an index impacted the find performed.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.