Reputation
1,836
Next tag badge:
113/400 score
66/80 answers
Badges
1 6 13
Newest
 mongodb
Impact
~51k people reached

Apr
12
comment Mongo indexes question
What's the total count of documents in the collection? It looks like your match is currently close to 100% of the total (44,896 documents returned on an index scan versus 45,193 index comparisons). In this case any index (or even a collection scan) will be as effective for returning your results. If you consider a query that processes all documents in a collection, an index comparison and document lookup involves more work than simply iterating through all documents in the collection (via a collection scan). There is no deterministic winning plan for your current query and indexes.
Apr
12
comment Mongo indexes question
The explain results show multiple candidate indexes that could support your query (and you could even remove a few unnecessary indexes that overlap). It looks like your criteria isn't very selective as the chosen query plan is an index scan and your results (nReturned) match 44,896 documents based on 45,183 index comparisons (keysExamined). Do nearly all your usersongs have the same room ID at the moment? A query that returns most (or all) documents from a collection won't benefit from an index.
Mar
22
comment Lots of isMaster queries running
What are your specific versions of MongoDB server and MongoDB driver?
Mar
19
comment Create replcaSet for the configServers in MongoDB
It looks like you have spaces between the seed hosts in your configdb string. You should remove the spaces or quote the whole string, eg: --configdb "configReplSet/Amir-PC:20000,Amir-PC:20001,Amir-PC:20002".
Mar
17
comment AS/400 + DB2 to MongoDB?
Are you referring to ongoing replication or a one-off migration? For the best outcome you should consider how to revise your data model to take advantage of MongoDB features rather than directly reusing an existing SQL/relational design. I'm not sure about AS/400 driver or language support, but there are official MongoDB drivers and community-supported drivers for most popular languages. You could either use an ETL tool or write a custom bridge that suits your use case.
Mar
17
comment How to restart mongos after it was shutdown in localhost?
You should be able to restart your mongos and mongod servers with the same parameters originally used. Any existing configuration (and data) for replication or sharding will still be available. If you are having any specific problems restarting, you'll need to provide more details (eg. version of MongoDB, command line you are using, and any relevant error messages).
Mar
15
answered Why mongodb requires arbiter in a 4 members replica set?
Mar
4
answered Limits of testing HA with a single server replica set?
Feb
19
answered Where to store administrative (DBA) data?
Feb
13
awarded  mongodb
Feb
12
answered mongodb running single instance with --auth flag enabled is it means mongob running autorization enabled?
Feb
11
comment MongoDB Configuration File Locations
@PrivatMamtora Some popular open source configuration management systems include Chef, Puppet, Ansible, and SaltStack but there are a lot of options available depending on your requirements. Full-blown configuration management solutions are likely overkill if you have a straightforward production environment and a small development team, but as the team/deployment grows these tools help you automate consistent deployments.
Feb
10
answered MongoDB Configuration File Locations
Feb
10
comment MongoDB Configuration File Locations
What O/S are you using, and how did you install MongoDB? I'm guessing OS X + Homebrew given the config file path.
Feb
9
comment on-premise MongoDB Ops Manager Slack integration
Slack integration should be included with Ops Manager 2.0, although I'm not sure on the exact version when it was added. Given Ops Manager license is part of a commercial support subscription I would suggest raising a CS issue (if you are a current customer) or contacting your account executive if you are trialling.
Feb
5
comment MongoDB aggregate() error in server
What does your connect string look like? The "not master and slaveOk=false" error indicates you are connecting to a secondary without specifying a secondary read preference. Note: your second example has misspelt the secondaryPreferred read preference.
Feb
4
comment MongoDB too many db.eval cause my DB can't read write
What is the db.eval() code you are running? Server-side $eval adds a number of challenges (performance, scaling, security, ...), and there is likely a better way to solve your use case. You also cannot access the db object or other collections from a server-side eval. If you frequently need data from multiple collections you should consider adjusting your data model or merging the results from multiple queries in your app code.
Feb
1
comment Can mongodb disable in-memory? force fully-in-disk
How big is your working set of data and what sort of performance are you expecting? Are you limited to a single server with a total of 2GB? Most databases are likely to struggle if you are constantly paging data from disk into limited available memory; efficient queries are generally supported by indexes which are cached in-memory for speed. You might want to look into embedded databases which target devices with limited resources, but there is likely a disconnect in your expectations of working with massive data with only 2GB of memory.
Jan
25
comment MongoDB replicaSet keep 'syncing to' and only can be connect with shell
The C# driver and any client applications will need to access the replica set on the configured IP and port name (as returned by rs.conf()). The first thing a driver does after connecting to a replica set is to discover the current configuration. The driver then uses those hostnames & ports for further connections. I suspect you aren't having any problems connecting with the mongo shell because you are using a direct connection rather than a replica set connection (which specifies the replSet name and one or more hosts).
Jan
23
comment MongoDB replicaSet keep 'syncing to' and only can be connect with shell
You mention using Docker; is your C# application connecting to the same hostnames / IP addresses as configured in the replica set rs.conf() (and are all hostnames resolvable/connectable from the environment running your C# application)?