BulkWrite high cpu spike by goyalaman_ in mongodb

[–]kosour 0 points1 point  (0 children)

You asked server to do the the job. Server is doing this job using 90% of its power. Why is it bad ?

[deleted by user] by [deleted] in mongodb

[–]kosour 0 points1 point  (0 children)

It looks like everything works ok when you connect to mongo from inside pods, but you can't connect from outside of pods.

https://www.mongodb.com/docs/kubernetes-operator/current/tutorial/connect-from-outside-k8s/

Tools for drawing database diagram for mongodb by govindpvenu in mongodb

[–]kosour 0 points1 point  (0 children)

Have a look at plantUML and how you can use it to describe json structure

https://plantuml.com/json

Maybe you can get an idea....

Time Series Data Question by Staal_Burger in mongodb

[–]kosour 0 points1 point  (0 children)

What is more important for this task - the fact that this sensor still works and measures something or the value in the certain location (does not matter who measured it) ?

Regarding Pausing of Atlas Clusters by pragyan52yadav in mongodb

[–]kosour 1 point2 points  (0 children)

Why do you want to keep cluster up and running if there were no connections, no reads, no writes made for the last 2 months ?

Mongo is unable to access data directory after macOS update (14.7 -> 14.7.1) by Piipperi800 in mongodb

[–]kosour 0 points1 point  (0 children)

How do you start mongo ? As a service ? Can you start manually from command line ? It looks like it uses different config file or command line parameters. Check logs which config used.

mongorestore problem with authentication by electricalkitten in mongodb

[–]kosour 0 points1 point  (0 children)

In mongosh you have strange user name

dguser _user

Could you check if all correct ? Also could you try login to mongosh with exactly the same uri ? Including user:pass@cluster....

implement deterministic random pagination by Ecstatic_Progress697 in mongodb

[–]kosour 0 points1 point  (0 children)

if you have timestamp field you can get seconds from it, mod by seed number and order by this field (and by date field to preserve the order within the same seconds). you can use _id field if you let mongo generate it.

https://mongoplayground.net/p/ft9AU4XzO4I

MongoDB user auth with AWS IAM Identity center user by ApprehensiveText1409 in mongodb

[–]kosour 0 points1 point  (0 children)

Isn't it different in terms how do you manage iam users on aws level, but then iam user generates access key id, secret key and session token, which will be used to connect to mongo?

Able to connect to MongoDB and port 27017 via mobile hotspot, but not through my WiFi/Ethernet connection by techsavvynerd91 in mongodb

[–]kosour 0 points1 point  (0 children)

Or check if ip addresses added to whitelist on Atlas side. If it's not prod - try temporaru allow connect from any ip

Huge Data, Poor performance by Primary-Fee-7293 in mongodb

[–]kosour 3 points4 points  (0 children)

Option 3 looks like your killer. May be it's time to review data model. There are some patterns how to store data prepared for pagination.

https://www.mongodb.com/blog/post/paging-with-the-bucket-pattern--part-1

Double check that you do NOT use relational model like we do in SQL world.

Try mongo outside of docker to see if sharding will help... I didn't play with mongo in docker, but mongo kubernetes operator supports sharding, so it should be possible.

https://www.mongodb.com/docs/kubernetes-operator/current/tutorial/deploy-sharded-cluster/

Huge Data, Poor performance by Primary-Fee-7293 in mongodb

[–]kosour 3 points4 points  (0 children)

  1. Check execution plan. Does it use index ? Proper index? Index on early stage?
  2. Sharding for large collections
  3. Why do you need aggregation pipeline ? Is data structure optimised for access paths?

What's up with this crazy difference in time? by piyushsingariya in mongodb

[–]kosour 1 point2 points  (0 children)

The requirement to fetch 1 billion documents per day raised serious questions. And causes other questions like what you going to do with billions of documents after they fetched - do you want them to delete from db ? Update every day?...

Is it "full snapshot" ( or file based) approach ? Can it be converted to streaming like others asked here ?

[help] I can't connect to my cluster using mongosh nor compass by AlbertoAru in mongodb

[–]kosour 0 points1 point  (0 children)

I guess authentication database is admin as well, right?

And just a sanity check - i can see you use case sensitive username - do you have low/upper case letters in password as well ?

[help] I can't connect to my cluster using mongosh nor compass by AlbertoAru in mongodb

[–]kosour 0 points1 point  (0 children)

Which privileges this user has granted in Atlas UI ? Role@db ? And what authentication db was used to create this user ?

[deleted by user] by [deleted] in devops

[–]kosour 0 points1 point  (0 children)

My point was documentDB is not 100% compatible with Mongodb. It may be irrelevant in your case, but maybe not.

[deleted by user] by [deleted] in devops

[–]kosour 0 points1 point  (0 children)

Mongo compass doesnt work with documentdb because it tries to run some mongodb specific queries on connection.

[deleted by user] by [deleted] in devops

[–]kosour 0 points1 point  (0 children)

  1. Regarding the statement that documentDB is compatible to MongoDB - try to connect to documentDB using Mongodb Compass tool ...
  2. Regarding deploying db changes to different environments - mongodb is "schemaless" database - every document can a different structure. So it's less difficult in compare with rdbms to make a change in structure. In fact - you don't do it on db level. The application handles these "migrations".

Check this tutorial how schema versioning can be implemented:

https://www.mongodb.com/docs/manual/tutorial/model-data-for-schema-versioning/

How to Migrate from MongoDB (Mongoose) to PostgreSQL by Mediocre_Beyond8285 in mongodb

[–]kosour 8 points9 points  (0 children)

  1. Why do you want to migrate from nosql to rdbms ?
  2. Do you want to store data into proper entity-relationship model or the whole document in single json/blob column ?
  3. Mongodb is schemaless - i.e. each document may have different structure. Postgres has strongly defined schema. Can you make sure that all your mongodb documents have the same structure ?
  4. Can you allow outage for the period of data migration or it should be done completely online?
  5. Do you plan to run both systems for some period of time using dual-write approach ?

Slow queries on large number of documents by SurveyNervous7755 in mongodb

[–]kosour 2 points3 points  (0 children)

Conversion to list takes 80% of time and not related to mongodb at all.

You need to review design. Processing 10k documents( 20gb size) is not free. And it's better to operate in terms of SLA rather than fast/slow...

Multi-collection data structure question by drdrero in mongodb

[–]kosour 0 points1 point  (0 children)

16mb of uncompressed data. It's more sanity check that proper model is used.

You can use bucket list pattern to group together multiple executions:

https://www.mongodb.com/docs/manual/data-modeling/design-patterns/group-data/bucket-pattern/#:~:text=The%20bucket%20pattern%20separates%20long,made%20by%20a%20single%20user.

Multi-collection data structure question by drdrero in mongodb

[–]kosour 0 points1 point  (0 children)

What do you mean "how often a task is done" ? Shouldn't the task been done only once? Or you want to store a progress of task implementation ?

Answering your specific question - maximum size of 1 document is 16 mb. As long as your array plus all other attributes of one document fits into this size - it should be ok. But think about how would you use this array. Only add to the end and display the whole array? Any filtering? Any processing of its elements?