I am using mongo db cloud on GCP basic plan database option take too long time

i am getting Error on mongo database writing operation. i log into my server side mongo db take time more then 1 minutes.

i attached Error some time on server side.

my code init to write into database when db response it was more then one minutes

when success database write operation storage 978 bytes

Hi @Sanjay_Makwana, welcome to the community.
Seems like you have mentioned an incorrect value for write concern.
As mentioned in the screenshot posted by you, the following configuration is invalid:

{ w: "major$", ... }

Which should be replaced by the following:

{ w: "majority", ... }

Learn more about writeConcern in our documentation.

If you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,


@SourabhBagrecha thanks lots. it was working.

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